This commit is contained in:
Hadi Norouzi
2023-11-15 23:51:10 +03:30
21 changed files with 336 additions and 172 deletions

View File

@@ -17,8 +17,8 @@ android {
minSdkVersion 21
targetSdkVersion Integer.parseInt("$targetSdkVer")
multiDexEnabled true
versionCode 523
versionName "1.8.9"
versionCode 526
versionName "1.8.10"
}
buildTypes {

View File

@@ -50,7 +50,7 @@
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER"/>
<!-- <category android:name="android.intent.category.LEANBACK_LAUNCHER"/>-->
</intent-filter>
<intent-filter>
<action android:name="android.service.quicksettings.action.QS_TILE_PREFERENCES" />
@@ -192,6 +192,18 @@
</intent-filter>
</receiver>
<!-- =====================Tasker===================== -->
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data
android:name="androidx.work.WorkManagerInitializer"
android:value="androidx.startup"
tools:node="remove" />
</provider>
</application>

View File

@@ -40,6 +40,9 @@ object AppConfig {
const val PREF_BYPASS_APPS = "pref_bypass_apps"
const val PREF_CONFIRM_REMOVE = "pref_confirm_remove"
const val PREF_START_SCAN_IMMEDIATE = "pref_start_scan_immediate"
const val PREF_MUX_ENABLED = "pref_mux_enabled"
const val PREF_MUX_XUDP_CONCURRENCY = "pref_mux_xudp_concurency"
const val PREF_MUX_XUDP_QUIC = "pref_mux_xudp_quic"
const val HTTP_PROTOCOL: String = "http://"
const val HTTPS_PROTOCOL: String = "https://"
@@ -91,7 +94,7 @@ object AppConfig {
// subscription settings
const val SUBSCRIPTION_AUTO_UPDATE = "pref_auto_update_subscription"
const val SUBSCRIPTION_AUTO_UPDATE_INTERVAL = "pref_auto_update_interval"
const val DEFAULT_UPDATE_INTERVAL = "1440" // 24 hours
const val UPDATE_TASK_NAME = "subscription-updater"
const val SUBSCRIPTION_DEFAULT_UPDATE_INTERVAL = "1440" // 24 hours
const val SUBSCRIPTION_UPDATE_TASK_NAME = "subscription_updater"
}

View File

@@ -292,7 +292,10 @@ data class V2rayConfig(
}
}
data class MuxBean(var enabled: Boolean, var concurrency: Int = 8)
data class MuxBean(var enabled: Boolean,
var concurrency: Int = 8,
var xudpConcurrency: Int = 8,
var xudpProxyUDP443: String = "",)
fun getServerAddress(): String? {
if (protocol.equals(EConfigType.VMESS.name, true)

View File

@@ -1,29 +1,24 @@
package com.v2ray.ang.service
import android.Manifest
import android.annotation.SuppressLint
import android.app.NotificationChannel
import android.app.NotificationManager
import android.content.Context
import android.content.pm.PackageManager
import android.os.Build
import android.util.Log
import androidx.core.app.ActivityCompat
import androidx.core.app.NotificationCompat
import androidx.core.app.NotificationManagerCompat
import androidx.work.CoroutineWorker
import androidx.work.WorkerParameters
import com.v2ray.ang.AppConfig
import com.v2ray.ang.R
import com.v2ray.ang.extension.toast
import com.v2ray.ang.util.AngConfigManager
import com.v2ray.ang.util.MmkvManager
import com.v2ray.ang.util.Utils
import kotlinx.coroutines.delay
object SubscriptionUpdater {
const val notificationChannel = "update-subscription-channel"
const val notificationChannel = "subscription_update_channel"
class UpdateTask(context: Context, params: WorkerParameters) :
CoroutineWorker(context, params) {
@@ -31,23 +26,20 @@ object SubscriptionUpdater {
private val notificationManager = NotificationManagerCompat.from(applicationContext)
private val notification =
NotificationCompat.Builder(applicationContext, notificationChannel)
.setWhen(0)
.setTicker("Update")
.setContentTitle("Subscription Update")
.setContentTitle(context.getString(R.string.title_pref_auto_update_subscription))
.setSmallIcon(R.drawable.ic_stat_name)
.setCategory(NotificationCompat.CATEGORY_SERVICE)
.setPriority(NotificationCompat.PRIORITY_MIN)
.setPriority(NotificationCompat.PRIORITY_DEFAULT)
@SuppressLint("MissingPermission")
override suspend fun doWork(): Result {
Log.d(AppConfig.ANG_PACKAGE, "start updating subscriptions")
Log.d(AppConfig.ANG_PACKAGE, "subscription automatic update starting")
val subs = MmkvManager.decodeSubscriptions().filter { it.second.autoUpdate }
for (i in subs) {
val subscription = i.second
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@@ -61,7 +53,10 @@ object SubscriptionUpdater {
notificationManager.createNotificationChannel(channel)
}
notificationManager.notify(3, notification.build())
Log.d(AppConfig.ANG_PACKAGE, "update: ${subscription.remarks} subscription")
Log.d(
AppConfig.ANG_PACKAGE,
"subscription automatic update: ---${subscription.remarks}"
)
val configs = Utils.getUrlContentWithCustomUserAgent(subscription.url)
importBatchConfig(configs, i.first)
notification.setContentText("Updating ${subscription.remarks}")
@@ -72,10 +67,9 @@ object SubscriptionUpdater {
}
fun importBatchConfig(server: String?, subid: String = "") {
val append = subid.isEmpty()
val append = subid.isNullOrEmpty()
var count = AngConfigManager.importBatchConfig(server, subid, append)
val count = AngConfigManager.importBatchConfig(server, subid, append)
if (count <= 0) {
AngConfigManager.importBatchConfig(Utils.decode(server!!), subid, append)
}

View File

@@ -96,7 +96,8 @@ class MainRecyclerAdapter(val activity: MainActivity) : RecyclerView.Adapter<Mai
holder.itemMainBinding.tvType.text = config.configType.name.lowercase()
}
}
holder.itemMainBinding.tvStatistics.text = "${outbound?.getServerAddress()} : ${outbound?.getServerPort()}"
val strState = "***${outbound?.getServerAddress()?.drop(3)} : ${outbound?.getServerPort()}"
holder.itemMainBinding.tvStatistics.text = strState
holder.itemMainBinding.layoutShare.setOnClickListener {
AlertDialog.Builder(mActivity).setItems(shareOptions.toTypedArray()) { _, i ->

View File

@@ -304,7 +304,11 @@ class ServerActivity : BaseActivity() {
}
val config = MmkvManager.decodeServerConfig(editGuid) ?: ServerConfig.create(createConfigType)
if (config.configType != EConfigType.SOCKS && TextUtils.isEmpty(et_id.text.toString())) {
toast(R.string.server_lab_id)
if (config.configType == EConfigType.TROJAN || config.configType == EConfigType.SHADOWSOCKS) {
toast(R.string.server_lab_id3)
}else{
toast(R.string.server_lab_id)
}
return false
}
sp_stream_security?.let {

View File

@@ -14,13 +14,10 @@ import androidx.work.multiprocess.RemoteWorkManager
import com.v2ray.ang.AngApplication
import com.v2ray.ang.AppConfig
import com.v2ray.ang.R
import com.v2ray.ang.dto.AngConfig
import com.v2ray.ang.service.SubscriptionUpdater
import com.v2ray.ang.util.Utils
import com.v2ray.ang.viewmodel.SettingsViewModel
import java.sql.Time
import java.util.concurrent.TimeUnit
import kotlin.time.toDuration
class SettingsActivity : BaseActivity() {
private val settingsViewModel: SettingsViewModel by viewModels()
@@ -40,6 +37,11 @@ class SettingsActivity : BaseActivity() {
private val fakeDns by lazy { findPreference<CheckBoxPreference>(AppConfig.PREF_FAKE_DNS_ENABLED) }
private val localDnsPort by lazy { findPreference<EditTextPreference>(AppConfig.PREF_LOCAL_DNS_PORT) }
private val vpnDns by lazy { findPreference<EditTextPreference>(AppConfig.PREF_VPN_DNS) }
private val mux by lazy { findPreference<CheckBoxPreference>(AppConfig.PREF_MUX_ENABLED) }
private val muxXudpConcurrency by lazy { findPreference<EditTextPreference>(AppConfig.PREF_MUX_XUDP_CONCURRENCY) }
private val muxXudpQuic by lazy { findPreference<ListPreference>(AppConfig.PREF_MUX_XUDP_QUIC) }
// val autoRestart by lazy { findPreference(PREF_AUTO_RESTART) as CheckBoxPreference }
private val remoteDns by lazy { findPreference<EditTextPreference>(AppConfig.PREF_REMOTE_DNS) }
@@ -76,9 +78,9 @@ class SettingsActivity : BaseActivity() {
autoUpdateInterval?.setOnPreferenceChangeListener { _, any ->
val nval = any as String
autoUpdateInterval?.summary =
if (TextUtils.isEmpty(nval) or (nval.toLong() < 15)) AppConfig.DEFAULT_UPDATE_INTERVAL else nval
if (TextUtils.isEmpty(nval) or (nval.toLong() < 1)) AppConfig.SUBSCRIPTION_DEFAULT_UPDATE_INTERVAL else nval
configureUpdateTask(nval.toLong())
false
true
}
// licenses.onClick {
@@ -152,6 +154,14 @@ class SettingsActivity : BaseActivity() {
}
mode?.dialogLayoutResource = R.layout.preference_with_help_link
//loglevel.summary = "LogLevel"
mux?.setOnPreferenceChangeListener { _, newValue ->
updateMux(newValue as Boolean)
true
}
muxXudpConcurrency?.setOnPreferenceChangeListener { _, newValue ->
updateMuxConcurrency(newValue as String)
true
}
}
override fun onStart() {
@@ -160,21 +170,15 @@ class SettingsActivity : BaseActivity() {
PreferenceManager.getDefaultSharedPreferences(requireActivity())
updateMode(defaultSharedPreferences.getString(AppConfig.PREF_MODE, "VPN"))
var remoteDnsString = defaultSharedPreferences.getString(AppConfig.PREF_REMOTE_DNS, "")
domesticDns?.summary =
defaultSharedPreferences.getString(AppConfig.PREF_DOMESTIC_DNS, "")
localDnsPort?.summary = defaultSharedPreferences.getString(
AppConfig.PREF_LOCAL_DNS_PORT,
AppConfig.PORT_LOCAL_DNS
)
socksPort?.summary =
defaultSharedPreferences.getString(AppConfig.PREF_SOCKS_PORT, AppConfig.PORT_SOCKS)
httpPort?.summary =
defaultSharedPreferences.getString(AppConfig.PREF_HTTP_PORT, AppConfig.PORT_HTTP)
autoUpdateInterval?.summary = defaultSharedPreferences.getString(
AppConfig.SUBSCRIPTION_AUTO_UPDATE_INTERVAL,
AppConfig.DEFAULT_UPDATE_INTERVAL
)
domesticDns?.summary = defaultSharedPreferences.getString(AppConfig.PREF_DOMESTIC_DNS, "")
localDnsPort?.summary = defaultSharedPreferences.getString(AppConfig.PREF_LOCAL_DNS_PORT, AppConfig.PORT_LOCAL_DNS)
socksPort?.summary = defaultSharedPreferences.getString(AppConfig.PREF_SOCKS_PORT, AppConfig.PORT_SOCKS)
httpPort?.summary = defaultSharedPreferences.getString(AppConfig.PREF_HTTP_PORT, AppConfig.PORT_HTTP)
updateMux(defaultSharedPreferences.getBoolean(AppConfig.PREF_MUX_ENABLED, false))
muxXudpConcurrency?.summary = defaultSharedPreferences.getString(AppConfig.PREF_MUX_XUDP_CONCURRENCY, "8")
autoUpdateInterval?.summary = defaultSharedPreferences.getString(AppConfig.SUBSCRIPTION_AUTO_UPDATE_INTERVAL,AppConfig.SUBSCRIPTION_DEFAULT_UPDATE_INTERVAL)
autoUpdateInterval?.isEnabled = defaultSharedPreferences.getBoolean(AppConfig.SUBSCRIPTION_AUTO_UPDATE, false)
if (TextUtils.isEmpty(remoteDnsString)) {
remoteDnsString = AppConfig.DNS_AGENT
@@ -227,9 +231,9 @@ class SettingsActivity : BaseActivity() {
private fun configureUpdateTask(interval: Long) {
val rw = RemoteWorkManager.getInstance(AngApplication.application)
rw.cancelUniqueWork(AppConfig.UPDATE_TASK_NAME)
rw.cancelUniqueWork(AppConfig.SUBSCRIPTION_UPDATE_TASK_NAME)
rw.enqueueUniquePeriodicWork(
AppConfig.UPDATE_TASK_NAME,
AppConfig.SUBSCRIPTION_UPDATE_TASK_NAME,
ExistingPeriodicWorkPolicy.UPDATE,
PeriodicWorkRequest.Builder(
SubscriptionUpdater.UpdateTask::class.java,
@@ -239,17 +243,32 @@ class SettingsActivity : BaseActivity() {
.apply {
setInitialDelay(interval, TimeUnit.MINUTES)
}
.setConstraints(
Constraints(
NetworkType.CONNECTED,
)
).build()
.build()
)
}
private fun cancelUpdateTask() {
val rw = RemoteWorkManager.getInstance(AngApplication.application)
rw.cancelUniqueWork(AppConfig.UPDATE_TASK_NAME)
rw.cancelUniqueWork(AppConfig.SUBSCRIPTION_UPDATE_TASK_NAME)
}
private fun updateMux(enabled: Boolean) {
val defaultSharedPreferences = PreferenceManager.getDefaultSharedPreferences(requireActivity())
muxXudpConcurrency?.isEnabled = enabled
muxXudpQuic?.isEnabled = enabled
if (enabled) {
updateMuxConcurrency(defaultSharedPreferences.getString(AppConfig.PREF_MUX_XUDP_CONCURRENCY, "8"))
}
}
private fun updateMuxConcurrency(value: String?) {
if (value == null) {
muxXudpQuic?.isEnabled = true
} else {
val concurrency = value.toIntOrNull() ?: 8
muxXudpConcurrency?.summary = concurrency.toString()
muxXudpQuic?.isEnabled = concurrency >= 0
}
}
}

View File

@@ -64,7 +64,7 @@ object V2rayConfigUtil {
inbounds(v2rayConfig)
httpRequestObject(outbound)
updateOutboundWithGlobalSettings(outbound)
v2rayConfig.outbounds[0] = outbound
@@ -399,10 +399,37 @@ object V2rayConfigUtil {
return true
}
private fun httpRequestObject(outbound: V2rayConfig.OutboundBean): Boolean {
private fun updateOutboundWithGlobalSettings(outbound: V2rayConfig.OutboundBean): Boolean {
try {
var muxEnabled = settingsStorage?.decodeBool(AppConfig.PREF_MUX_ENABLED, false)
val protocol = outbound.protocol
if (protocol.equals(EConfigType.SHADOWSOCKS.name, true)
|| protocol.equals(EConfigType.SOCKS.name, true)
|| protocol.equals(EConfigType.TROJAN.name, true)
) {
muxEnabled = false
} else if (protocol.equals(EConfigType.VLESS.name, true)
&& outbound.settings?.vnext?.get(0)?.users?.get(0)?.flow?.isNotEmpty() == true
) {
muxEnabled = false
}
if (muxEnabled == true) {
outbound.mux?.enabled = true
outbound.mux?.concurrency = 8
outbound.mux?.xudpConcurrency =
settingsStorage?.decodeInt(AppConfig.PREF_MUX_XUDP_CONCURRENCY) ?: 8
outbound.mux?.xudpProxyUDP443 =
settingsStorage?.decodeString(AppConfig.PREF_MUX_XUDP_QUIC) ?: "reject"
} else {
outbound.mux?.enabled = false
outbound.mux?.concurrency = -1
}
if (outbound.streamSettings?.network == DEFAULT_NETWORK
&& outbound.streamSettings?.tcpSettings?.header?.type == HTTP) {
&& outbound.streamSettings?.tcpSettings?.header?.type == HTTP
) {
val path = outbound.streamSettings?.tcpSettings?.header?.request?.path
val host = outbound.streamSettings?.tcpSettings?.header?.request?.headers?.Host

View File

@@ -39,7 +39,9 @@ class SettingsViewModel(application: Application) : AndroidViewModel(application
AppConfig.PREF_ROUTING_MODE,
AppConfig.PREF_V2RAY_ROUTING_AGENT,
AppConfig.PREF_V2RAY_ROUTING_BLOCKED,
AppConfig.PREF_V2RAY_ROUTING_DIRECT, -> {
AppConfig.PREF_V2RAY_ROUTING_DIRECT,
AppConfig.SUBSCRIPTION_AUTO_UPDATE_INTERVAL,
AppConfig.PREF_MUX_XUDP_QUIC, -> {
settingsStorage?.encode(key, sharedPreferences.getString(key, ""))
}
AppConfig.PREF_SPEED_ENABLED,
@@ -51,12 +53,17 @@ class SettingsViewModel(application: Application) : AndroidViewModel(application
AppConfig.PREF_PER_APP_PROXY,
AppConfig.PREF_BYPASS_APPS,
AppConfig.PREF_CONFIRM_REMOVE,
AppConfig.PREF_START_SCAN_IMMEDIATE, -> {
AppConfig.PREF_START_SCAN_IMMEDIATE,
AppConfig.SUBSCRIPTION_AUTO_UPDATE,
AppConfig.PREF_MUX_ENABLED, -> {
settingsStorage?.encode(key, sharedPreferences.getBoolean(key, false))
}
AppConfig.PREF_SNIFFING_ENABLED -> {
settingsStorage?.encode(key, sharedPreferences.getBoolean(key, true))
}
AppConfig.PREF_MUX_XUDP_CONCURRENCY -> {
settingsStorage?.encode(key, sharedPreferences.getString(key, "8")?.toIntOrNull() ?: 8)
}
AppConfig.PREF_PER_APP_PROXY_SET -> {
settingsStorage?.encode(key, sharedPreferences.getStringSet(key, setOf()))
}

View File

@@ -69,6 +69,28 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_margin_top_height"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:text="@string/sub_auto_update" />
<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/auto_update_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="2dp"
android:paddingEnd="6dp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -94,27 +116,6 @@
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_margin_top_height"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:text="@string/sub_auto_update" />
<androidx.appcompat.widget.AppCompatCheckBox
android:id="@+id/auto_update_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="2dp"
android:paddingEnd="6dp" />
</LinearLayout>
</LinearLayout>

View File

@@ -41,7 +41,12 @@
android:orientation="vertical"
android:paddingStart="9dp">
<TextView
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/tv_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -49,18 +54,18 @@
android:minLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Subhead" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1" />
<TextView
android:id="@+id/tv_statistics"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:lines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textSize="12sp"/>
</LinearLayout>

View File

@@ -97,7 +97,14 @@
<string name="title_pref_per_app_proxy">وكيل لكل تطبيق</string>
<string name="summary_pref_per_app_proxy">عام: التطبيق المحدد هو الوكيل، الاتصال غير المحدد مباشر؛ \nوضع التجاوز: التطبيق المحدد متصل مباشرة، الوكيل غير المحدد. \nالخيار لتحديد التطبيق الوكيل تلقائيا في القائمة</string>
<string name="title_pref_mux_enabled">تمكين Mux</string>
<string name="summary_pref_mux_enabled">التمكين قد يسرع الشبكة والتبديل بين الشبكات قد يكون فلاش</string>
<string name="summary_pref_mux_enabled">حركة مرور TCP مع 8 اتصالات افتراضية، قم بتخصيص كيفية التعامل مع UDP وQUIC أدناهn\أسرع، لكنه قد يسبب اتصالاً غير مستقر</string>
<string name="title_pref_mux_xudp_concurency">اتصالات XUDP (النطاق من -1 إلى 1024)</string>
<string name="title_pref_mux_xudp_quic">التعامل مع QUIC في نفق مكس</string>
<string-array name="mux_xudp_quic_entries">
<item>يرفض</item>
<item>مسموح</item>
<item>يتخطى</item>
</string-array>
<string name="title_pref_speed_enabled">تمكين عرض السرعة</string>
<string name="summary_pref_speed_enabled">عرض السرعة الحالية في الإشعار.\nسيتغير رمز الإشعار استنادًا إلى الاستخدام.</string>
<string name="title_pref_sniffing_enabled">تمكين Sniffing</string>

View File

@@ -98,7 +98,14 @@
<string name="summary_pref_per_app_proxy">عمومی: برنامه بررسی شده پروکسی است، اتصال مستقیم بدون بررسی است. \nحالت bypass: برنامه بررسی شده مستقیما متصل است، پراکسی بررسی نشده است. \nگزینهای برای انتخاب خودکار پروکسی برنامه در منو است</string>
<string name="title_pref_mux_enabled">فعال کردن Mux</string>
<string name="summary_pref_mux_enabled">فعال کردن شاید سرعت بخشیدن به شبکه و تغییر شبکه شاید فلش، بهبود کند</string>
<string name="summary_pref_mux_enabled">سریعتر است، اما ممکن است باعث اتصال ناپایدار شود\nمخزن ترافیک TCP با 8 اتصال پیش‌فرض، نحوه مدیریت UDP و QUIC را در زیر سفارشی کنید</string>
<string name="title_pref_mux_xudp_concurency">اتصالات XUDP (محدوده -1 تا 1024)</string>
<string name="title_pref_mux_xudp_quic">مدیریت QUIC در تونل mux</string>
<string-array name="mux_xudp_quic_entries">
<item>رد کردن</item>
<item>مجاز</item>
<item>جست و خیز کردن</item>
</string-array>
<string name="title_pref_speed_enabled">فعال کردن نمایش سرعت</string>
<string name="summary_pref_speed_enabled">نمایش سرعت فعلی در قسمت آگاه‌سازی. \nآیکون آگاه‌سازی بر اساس استفاده تغییر می‌کند.</string>

View File

@@ -32,7 +32,7 @@
<string name="menu_item_import_config_manually_trojan">Ручной ввод профиля Trojan</string>
<string name="menu_item_import_config_custom">Пользовательский профиль</string>
<string name="menu_item_import_config_custom_clipboard">Импорт из буфера обмена</string>
<string name="menu_item_import_config_custom_local">Импорт с устройства</string>
<string name="menu_item_import_config_custom_local">Импорт из файла</string>
<string name="menu_item_import_config_custom_url">Импорт из URL</string>
<string name="menu_item_import_config_custom_url_scan">Импорт сканированием URL</string>
<string name="del_config_comfirm">Подтверждаете удаление?</string>
@@ -103,7 +103,14 @@
<string name="summary_pref_per_app_proxy">Основной: выделенное приложение соединяется через прокси, не выделенное — напрямую; \n\nРежим обхода: выделенное приложение соединяется напрямую, не выделенное — через прокси.\n\nЕсть возможность автоматического выбора проксируемых приложений в меню.</string>
<string name="title_pref_mux_enabled">Использовать мультиплексирование</string>
<string name="summary_pref_mux_enabled">Включение может ускорить работу и переключение сети</string>
<string name="summary_pref_mux_enabled">Быстрее, но это может привести к нестабильному соединению.\nМультиплексирование TCP-трафика с 8 соединениями по умолчанию, ниже можно настроить обработку UDP и QUIC.</string>
<string name="title_pref_mux_xudp_concurency">XUDP-соединения (диапазон от -1 до 1024)</string>
<string name="title_pref_mux_xudp_quic">Обработка QUIC в мультиплексном туннеле</string>
<string-array name="mux_xudp_quic_entries">
<item>отклонять</item>
<item>разрешать</item>
<item>пропускать</item>
</string-array>
<string name="title_pref_speed_enabled">Отображение скорости</string>
<string name="summary_pref_speed_enabled">Показывать текущую скорость в уведомлении.\nЗначок будет меняться в зависимости от использования.</string>
@@ -163,6 +170,10 @@
<string name="title_pref_promotion">Содействие</string>
<string name="summary_pref_promotion">Содействие, нажмите для получения подробной информации (пожертвование может быть удалено)</string>
<string name="title_pref_auto_update_subscription">Автоматическое обновление подписок</string>
<string name="summary_pref_auto_update_subscription">Автоматическое обновление подписок в фоновом режиме с указанным интервалом. В зависимости от устройства эта функция может работать не всегда.</string>
<string name="title_pref_auto_update_interval">Интервал автообновления (мин.)</string>
<string name="title_core_loglevel">Подробность ведения журнала</string>
<string name="title_mode">Режим</string>
<string name="title_mode_help">Нажмите для получения дополнительной информации</string>
@@ -175,12 +186,13 @@
<string name="title_service_restart">Перезапуск службы</string>
<string name="title_del_all_config">Удалить все профили</string>
<string name="title_del_duplicate_config">Удалить дубликаты профилей</string>
<string name="title_del_invalid_config">Удалить сбойные профили (после проверки)</string>
<string name="title_del_invalid_config">Удалить нерабочие профили (после проверки)</string>
<string name="title_export_all">Экспорт всех профилей в буфер обмена</string>
<string name="title_sub_setting">Группы</string>
<string name="sub_setting_remarks">примечания</string>
<string name="sub_setting_url">URL (необязательно)</string>
<string name="sub_setting_enable">использовать обновление</string>
<string name="sub_setting_enable">Использовать обновление</string>
<string name="sub_auto_update">Использовать автоматическое обновление</string>
<string name="title_sub_update">Обновить подписку</string>
<string name="title_ping_all_server">Проверка доступности профилей</string>
<string name="title_real_ping_all_server">Время отклика профилей</string>
@@ -199,7 +211,7 @@
<string name="routing_settings_delete">Очистить</string>
<string name="routing_settings_scan_replace">Сканировать и заменить</string>
<string name="routing_settings_scan_append">Сканировать и добавить</string>
<string name="routing_settings_default_rules"> Правила по умолчанию</string>
<string name="routing_settings_default_rules">Правила по умолчанию</string>
<string name="connection_test_pending">Проверить подключение</string>
<string name="connection_test_testing">Проверка…</string>
@@ -210,6 +222,9 @@
<string name="connection_connected">Подключено, нажмите для проверки</string>
<string name="connection_not_connected">Не подключено</string>
<string name="import_subscription_success">Подписка импортирована</string>
<string name="import_subscription_failure">Невозможно импортировать подписку</string>
<string-array name="share_method">
<item>QR-код</item>
<item>Экспорт в буфер обмена</item>
@@ -239,7 +254,5 @@
<item>VPN</item>
<item>Только прокси</item>
</string-array>
<string name="import_subscription_success">Подписка импортирована</string>
<string name="import_subscription_failure">Подписка не импортирована</string>
</resources>

View File

@@ -97,7 +97,15 @@
<string name="summary_pref_per_app_proxy">- Chung: Ứng dụng đã chọn sẽ kết nối Proxy, chưa lựa chọn sẽ kết nối trực tiếp. \n- Bỏ qua kết nối: Ứng dụng được chọn sẽ trực tiếp kết nối, không lựa chọn sẽ kết nối qua Proxy. \n- Lựa chọn để tự động chọn ứng dụng Proxy trong Menu.</string>
<string name="title_pref_mux_enabled">Cho phép Mux</string>
<string name="summary_pref_mux_enabled">Bật lên có thể làm tăng tốc độ mạng và chuyển mạng nhanh hơn.</string>
<string name="summary_pref_mux_enabled">Nhanh hơn nhưng có thể khiến kết nối không ổn định\nMux lưu lượng TCP với 8 kết nối mặc định, tùy chỉnh cách xử lý UDP và QUIC bên dưới</string>
<string name="title_pref_mux_xudp_concurency">Kết nối XUDP (phạm vi -1 đến 1024)</string>
<string name="title_pref_mux_xudp_quic">Xử lý QUIC trong đường hầm mux</string>
<string-array name="mux_xudp_quic_entries">
<item>từ chối</item>
<item>cho phép</item>
<item>nhảy</item>
</string-array>
<string name="title_pref_speed_enabled">Cho phép hiển thị tốc độ mạng</string>
<string name="summary_pref_speed_enabled">Hiển thị tốc độ mạng hiện tại trên thanh thông báo.\nBiểu tượng trên thanh trạng thái có thể thay đổi tùy vào mức sử dụng.</string>

View File

@@ -96,8 +96,15 @@
<string name="title_pref_per_app_proxy">分应用代理</string>
<string name="summary_pref_per_app_proxy">常规:勾选的App被代理,未勾选的直连;\n绕行模式:勾选的App直连,未勾选的被代理.\n不明白者在菜单中选择自动选中需代理应用</string>
<string name="title_pref_mux_enabled">启用Mux多路复用</string>
<string name="summary_pref_mux_enabled">开启可能会加速,关闭可能会减少断流</string>
<string name="title_pref_mux_enabled">启用 Mux 多路复用</string>
<string name="summary_pref_mux_enabled">减低延时,但可能会断流,建议不要启用。\nTCP 默认复用 8 个子链接UDP 及 QUIC 流量处理方式下方可选。</string>
<string name="title_pref_mux_xudp_concurency">XUDP 复用子链接数(可填 -1 至 1024</string>
<string name="title_pref_mux_xudp_quic">QUIC 流量处理方式</string>
<string-array name="mux_xudp_quic_entries">
<item>不代理</item>
<item>多路复用</item>
<item>原生</item>
</string-array>
<string name="title_pref_speed_enabled">启用速度显示</string>
<string name="summary_pref_speed_enabled">在通知中显示当前速度\n小图标显示流量的路由情况</string>
@@ -157,6 +164,10 @@
<string name="title_pref_promotion">推广</string>
<string name="summary_pref_promotion">一些推广,点击查看详情(捐赠可去除)</string>
<string name="title_pref_auto_update_subscription">自动更新订阅</string>
<string name="summary_pref_auto_update_subscription">在后台按一定时间间隔自动更新您的订阅。受设备影响,此功能不一定总是有效</string>
<string name="title_pref_auto_update_interval">订阅自动更新间隔(分钟)</string>
<string name="title_core_loglevel">日志级别</string>
<string name="title_mode">模式</string>
<string name="title_mode_help">点此查看更多帮助</string>
@@ -175,6 +186,7 @@
<string name="sub_setting_remarks">备注</string>
<string name="sub_setting_url">可选地址(url)</string>
<string name="sub_setting_enable">启用更新</string>
<string name="sub_auto_update">启用自动更新</string>
<string name="title_sub_update">更新订阅</string>
<string name="title_ping_all_server">测试全部配置Tcping</string>
<string name="title_real_ping_all_server">测试全部配置真连接</string>

View File

@@ -96,8 +96,15 @@
<string name="title_pref_per_app_proxy">Proxy 個別應用程式</string>
<string name="summary_pref_per_app_proxy">常規:勾選的 App 啟用 Proxy未勾選的直接連線\n繞行模式勾選的 App 直接連線,未勾選的啟用 Proxy。\n可在選單中選擇自動選中需 Proxy 應用</string>
<string name="title_pref_mux_enabled">啟用 Mux</string>
<string name="summary_pref_mux_enabled">啟用或許會加快網路速度,切換或許會閃爍</string>
<string name="title_pref_mux_enabled">啟用 Mux 多路復用</string>
<string name="summary_pref_mux_enabled">減低延時 但可能會斷流\nTCP 默認復用 8 個子鏈接UDP 及 QUIC 流量處理方式下方可選</string>
<string name="title_pref_mux_xudp_concurency">XUDP 復用子鏈接數(可填 -1 至 1024</string>
<string name="title_pref_mux_xudp_quic">QUIC 流量處理方式</string>
<string-array name="mux_xudp_quic_entries">
<item>不代理</item>
<item>多路復用</item>
<item>原生</item>
</string-array>
<string name="title_pref_speed_enabled">啟用速度顯示</string>
<string name="summary_pref_speed_enabled">在通知中顯示當前速度\n小圖示顯示流量的轉送狀況</string>
@@ -157,6 +164,10 @@
<string name="title_pref_promotion">推廣</string>
<string name="summary_pref_promotion">一些推廣,輕觸以檢視 (捐贈可去除)</string>
<string name="title_pref_auto_update_subscription">自動更新訂閱</string>
<string name="summary_pref_auto_update_subscription">在後台以一定時間間隔自動更新您的訂閱。受設備影響,此功能不一定總是有效</string>
<string name="title_pref_auto_update_interval">訂閱自動更新間隔(分鐘)</string>
<string name="title_core_loglevel">記錄層級</string>
<string name="title_mode">模式</string>
<string name="title_mode_help">輕觸以檢視說明</string>
@@ -175,6 +186,7 @@
<string name="sub_setting_remarks">備註</string>
<string name="sub_setting_url">Optional URL</string>
<string name="sub_setting_enable">啟用更新</string>
<string name="sub_auto_update">啟用自動更新</string>
<string name="title_sub_update">更新訂閱</string>
<string name="title_ping_all_server">偵測所有組態 Tcping</string>
<string name="title_real_ping_all_server">偵測所有組態真延遲</string>

View File

@@ -179,4 +179,10 @@
<item>fa</item>
<item>ar</item>
</string-array>
<string-array name="mux_xudp_quic_value" translatable="false">
<item>reject</item>
<item>allow</item>
<item>skip</item>
</string-array>
</resources>

View File

@@ -103,7 +103,14 @@
<string name="summary_pref_per_app_proxy">General: Checked App is proxy, unchecked direct connection; \nbypass mode: checked app directly connected, unchecked proxy. \nThe option to automatically select the proxy application in the menu</string>
<string name="title_pref_mux_enabled">Enable Mux</string>
<string name="summary_pref_mux_enabled">Enable maybe speed up network and switch network maybe flash</string>
<string name="summary_pref_mux_enabled">Faster, but it may cause unstable connectivity\nTCP traffic mux with default 8 connectionscustomize how to handle UDP and QUIC below</string>
<string name="title_pref_mux_xudp_concurency">XUDP connectionsrange -1 to 1024</string>
<string name="title_pref_mux_xudp_quic">Handling of QUIC in mux tunnel</string>
<string-array name="mux_xudp_quic_entries">
<item>reject</item>
<item>allow</item>
<item>skip</item>
</string-array>
<string name="title_pref_speed_enabled">Enable speed display</string>
<string name="summary_pref_speed_enabled">Display current speed in the notification.\nNotification icon would change based on
@@ -165,6 +172,10 @@
<string name="title_pref_promotion">Promotion</string>
<string name="summary_pref_promotion">Promotion,click for details(Donation can be removed)</string>
<string name="title_pref_auto_update_subscription">Automatic update subscriptions</string>
<string name="summary_pref_auto_update_subscription">Update your subscriptions automatically with an interval in background. Depending on the device, this feature may not always work</string>
<string name="title_pref_auto_update_interval">Subscription Auto Update Interval (Minutes)</string>
<string name="title_core_loglevel">Log Level</string>
<string name="title_mode">Mode</string>
<string name="title_mode_help">Click me for more help</string>
@@ -182,8 +193,8 @@
<string name="title_sub_setting">Subscription group setting</string>
<string name="sub_setting_remarks">remarks</string>
<string name="sub_setting_url">Optional URL</string>
<string name="sub_setting_enable">enable update</string>
<string name="sub_auto_update">Auto update</string>
<string name="sub_setting_enable">Enable update</string>
<string name="sub_auto_update">Enable automatic update</string>
<string name="title_sub_update">Update subscription</string>
<string name="title_ping_all_server">Tcping all configuration</string>
<string name="title_real_ping_all_server">Real delay all configuration</string>

View File

@@ -1,15 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<CheckBoxPreference
android:key="pref_speed_enabled"
android:summary="@string/summary_pref_speed_enabled"
android:title="@string/title_pref_speed_enabled" />
<CheckBoxPreference
android:defaultValue="true"
android:key="pref_sniffing_enabled"
android:summary="@string/summary_pref_sniffing_enabled"
android:title="@string/title_pref_sniffing_enabled" />
android:defaultValue="true"
android:key="pref_sniffing_enabled"
android:summary="@string/summary_pref_sniffing_enabled"
android:title="@string/title_pref_sniffing_enabled" />
<CheckBoxPreference
android:key="pref_mux_enabled"
android:summary="@string/summary_pref_mux_enabled"
android:title="@string/title_pref_mux_enabled" />
<EditTextPreference
android:key="pref_mux_xudp_concurency"
android:summary="8"
android:inputType="number"
android:title="@string/title_pref_mux_xudp_concurency" />
<ListPreference
android:defaultValue="reject"
android:entries="@array/mux_xudp_quic_entries"
android:entryValues="@array/mux_xudp_quic_value"
android:key="pref_mux_xudp_quic"
android:summary="%s"
android:title="@string/title_pref_mux_xudp_quic" />
<PreferenceCategory android:title="@string/title_vpn_settings">
<CheckBoxPreference
@@ -17,30 +32,26 @@
android:summary="@string/summary_pref_per_app_proxy"
android:title="@string/title_pref_per_app_proxy" />
<!--<CheckBoxPreference-->
<!--android:key="pref_mux_enabled"-->
<!--android:summary="@string/summary_pref_mux_enabled"-->
<!--android:title="@string/title_pref_mux_enabled" />-->
<CheckBoxPreference
android:key="pref_local_dns_enabled"
android:summary="@string/summary_pref_local_dns_enabled"
android:title="@string/title_pref_local_dns_enabled" />
android:key="pref_local_dns_enabled"
android:summary="@string/summary_pref_local_dns_enabled"
android:title="@string/title_pref_local_dns_enabled" />
<CheckBoxPreference
android:key="pref_fake_dns_enabled"
android:summary="@string/summary_pref_fake_dns_enabled"
android:title="@string/title_pref_fake_dns_enabled" />
android:key="pref_fake_dns_enabled"
android:summary="@string/summary_pref_fake_dns_enabled"
android:title="@string/title_pref_fake_dns_enabled" />
<EditTextPreference
android:key="pref_local_dns_port"
android:summary="10853"
android:inputType="number"
android:title="@string/title_pref_local_dns_port" />
android:key="pref_local_dns_port"
android:summary="10853"
android:inputType="number"
android:title="@string/title_pref_local_dns_port" />
<EditTextPreference
android:key="pref_vpn_dns"
android:summary="@string/summary_pref_remote_dns"
android:title="@string/title_pref_vpn_dns" />
android:key="pref_vpn_dns"
android:summary="@string/summary_pref_remote_dns"
android:title="@string/title_pref_vpn_dns" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/title_pref_routing">
@@ -67,6 +78,44 @@
</PreferenceCategory>
<PreferenceCategory android:title="@string/title_sub_setting">
<CheckBoxPreference
android:key="pref_auto_update_subscription"
android:summary="@string/summary_pref_auto_update_subscription"
android:title="@string/title_pref_auto_update_subscription" />
<EditTextPreference
android:key="pref_auto_update_interval"
android:summary="1440"
android:inputType="number"
android:title="@string/title_pref_auto_update_interval" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/title_ui_settings">
<CheckBoxPreference
android:key="pref_speed_enabled"
android:summary="@string/summary_pref_speed_enabled"
android:title="@string/title_pref_speed_enabled" />
<CheckBoxPreference
android:key="pref_confirm_remove"
android:summary="@string/summary_pref_confirm_remove"
android:title="@string/title_pref_confirm_remove" />
<CheckBoxPreference
android:key="pref_start_scan_immediate"
android:summary="@string/summary_pref_start_scan_immediate"
android:title="@string/title_pref_start_scan_immediate" />
<ListPreference
android:defaultValue="auto"
android:entries="@array/language_select"
android:entryValues="@array/language_select_value"
android:key="pref_language"
android:summary="%s"
android:title="@string/title_language" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/title_advanced">
<CheckBoxPreference
@@ -104,9 +153,9 @@
android:title="@string/title_pref_remote_dns" />
<EditTextPreference
android:key="pref_domestic_dns"
android:summary="@string/summary_pref_domestic_dns"
android:title="@string/title_pref_domestic_dns" />
android:key="pref_domestic_dns"
android:summary="@string/summary_pref_domestic_dns"
android:title="@string/title_pref_domestic_dns" />
<ListPreference
android:defaultValue="warning"
@@ -117,49 +166,12 @@
android:title="@string/title_core_loglevel" />
<ListPreference
android:defaultValue="VPN"
android:entries="@array/mode_entries"
android:entryValues="@array/mode_value"
android:key="pref_mode"
android:summary="%s"
android:title="@string/title_mode" />
</PreferenceCategory>
<PreferenceCategory android:title="Subscription">
<CheckBoxPreference
android:key="pref_auto_update_subscription"
android:summary="Update your subscriptions automatically with an interval in background"
android:title="Automatic update subscriptions" />
<EditTextPreference
android:key="pref_auto_update_interval"
android:summary="1440 min"
android:inputType="number"
android:title="Subscription Update Interval (Minutes)" />
</PreferenceCategory>
<PreferenceCategory android:title="@string/title_ui_settings">
<CheckBoxPreference
android:key="pref_confirm_remove"
android:summary="@string/summary_pref_confirm_remove"
android:title="@string/title_pref_confirm_remove" />
<CheckBoxPreference
android:key="pref_start_scan_immediate"
android:summary="@string/summary_pref_start_scan_immediate"
android:title="@string/title_pref_start_scan_immediate" />
<ListPreference
android:defaultValue="auto"
android:entries="@array/language_select"
android:entryValues="@array/language_select_value"
android:key="pref_language"
android:defaultValue="VPN"
android:entries="@array/mode_entries"
android:entryValues="@array/mode_value"
android:key="pref_mode"
android:summary="%s"
android:title="@string/title_language" />
android:title="@string/title_mode" />
</PreferenceCategory>
</PreferenceScreen>
</PreferenceScreen>