Compare commits

..

6 Commits

Author SHA1 Message Date
2dust
bf21428746 up 1.9.41 2025-03-24 15:45:56 +08:00
2dust
01ab8dad17 Optimize and improve removeWhiteSpace 2025-03-24 15:44:08 +08:00
2dust
8974f73841 Fix
https://github.com/2dust/v2rayNG/issues/4407
2025-03-24 14:43:07 +08:00
Pk-web6936
d3a2a2413c Update Persian translate (#4404)
* Update Persian translate

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml

* Update strings.xml
2025-03-24 10:50:13 +08:00
2dust
9b52863270 Bug fix
https://github.com/2dust/v2rayNG/issues/4405
2025-03-24 10:34:59 +08:00
2dust
733914a7a7 Add colorPrimaryDark to theme 2025-03-23 19:25:20 +08:00
40 changed files with 172 additions and 152 deletions

View File

@@ -12,8 +12,8 @@ android {
applicationId = "com.v2ray.ang"
minSdk = 21
targetSdk = 35
versionCode = 640
versionName = "1.9.40"
versionCode = 641
versionName = "1.9.41"
multiDexEnabled = true
val abiFilterList = (properties["ABI_FILTERS"] as? String)?.split(';')

View File

@@ -94,7 +94,7 @@ val URI.idnHost: String
*
* @return The string without whitespace.
*/
fun String.removeWhiteSpace(): String = replace("\\s+".toRegex(), "")
fun String?.removeWhiteSpace(): String? = this?.replace(" ", "")
/**
* Converts the string to a Long value, or returns 0 if the conversion fails.

View File

@@ -6,6 +6,7 @@ import com.v2ray.ang.dto.EConfigType
import com.v2ray.ang.dto.ProfileItem
import com.v2ray.ang.dto.V2rayConfig.OutboundBean
import com.v2ray.ang.extension.idnHost
import com.v2ray.ang.extension.removeWhiteSpace
import com.v2ray.ang.util.Utils
import java.net.URI
@@ -132,14 +133,14 @@ object WireguardFmt : FmtBase() {
dicQuery["publickey"] = config.publicKey.orEmpty()
if (config.reserved != null) {
dicQuery["reserved"] = Utils.removeWhiteSpace(config.reserved).orEmpty()
dicQuery["reserved"] = config.reserved.removeWhiteSpace().orEmpty()
}
dicQuery["address"] = Utils.removeWhiteSpace(config.localAddress).orEmpty()
dicQuery["address"] = config.localAddress.removeWhiteSpace().orEmpty()
if (config.mtu != null) {
dicQuery["mtu"] = config.mtu.toString()
}
if (config.preSharedKey != null) {
dicQuery["presharedkey"] = Utils.removeWhiteSpace(config.preSharedKey).orEmpty()
dicQuery["presharedkey"] = config.preSharedKey.removeWhiteSpace().orEmpty()
}
return toUri(config, config.secretKey, dicQuery)

View File

@@ -8,9 +8,9 @@ import com.v2ray.ang.dto.EConfigType
import com.v2ray.ang.dto.NetworkType
import com.v2ray.ang.dto.ProfileItem
import com.v2ray.ang.dto.ServerConfig
import com.v2ray.ang.extension.removeWhiteSpace
import com.v2ray.ang.handler.MmkvManager.decodeServerConfig
import com.v2ray.ang.util.JsonUtil
import com.v2ray.ang.util.Utils
object MigrateManager {
private const val ID_SERVER_CONFIG = "SERVER_CONFIG"
@@ -109,7 +109,7 @@ object MigrateManager {
config.insecure = tlsSettings?.allowInsecure
config.sni = tlsSettings?.serverName
config.fingerPrint = tlsSettings?.fingerprint
config.alpn = Utils.removeWhiteSpace(tlsSettings?.alpn?.joinToString(",")).toString()
config.alpn = tlsSettings?.alpn?.joinToString(",").removeWhiteSpace().toString()
config.publicKey = tlsSettings?.publicKey
config.shortId = tlsSettings?.shortId
@@ -172,10 +172,10 @@ object MigrateManager {
outbound.settings?.let { wireguard ->
config.secretKey = wireguard.secretKey
config.localAddress = Utils.removeWhiteSpace((wireguard.address as List<*>).joinToString(",")).toString()
config.localAddress = (wireguard.address as List<*>).joinToString(",").removeWhiteSpace().toString()
config.publicKey = wireguard.peers?.getOrNull(0)?.publicKey
config.mtu = wireguard.mtu
config.reserved = Utils.removeWhiteSpace(wireguard.reserved?.joinToString(",")).toString()
config.reserved = wireguard.reserved?.joinToString(",").removeWhiteSpace().toString()
}
return config
}
@@ -199,7 +199,7 @@ object MigrateManager {
outbound.streamSettings?.tlsSettings?.let { tlsSetting ->
config.insecure = tlsSetting.allowInsecure
config.sni = tlsSetting.serverName
config.alpn = Utils.removeWhiteSpace(tlsSetting.alpn?.joinToString(",")).orEmpty()
config.alpn = tlsSetting.alpn?.joinToString(",").removeWhiteSpace().orEmpty()
}
config.obfsPassword = outbound.settings?.obfsPassword

View File

@@ -4,7 +4,6 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.v2ray.ang.R
import com.v2ray.ang.databinding.ItemRecyclerBypassListBinding
import com.v2ray.ang.dto.AppInfo
@@ -35,7 +34,7 @@ class PerAppProxyAdapter(val activity: BaseActivity, val apps: List<AppInfo>, bl
val view = View(ctx)
view.layoutParams = ViewGroup.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ctx.resources.getDimensionPixelSize(R.dimen.view_height_dp64) * 0
0
)
BaseViewHolder(view)
}

View File

@@ -4,7 +4,6 @@ import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Intent
import android.content.pm.PackageManager
import android.content.res.Configuration.UI_MODE_NIGHT_MASK
import android.content.res.Configuration.UI_MODE_NIGHT_NO
import android.os.Build
@@ -437,25 +436,6 @@ object Utils {
.replace("|", "%7C")
}
/**
* Remove white space from a string.
*
* @param str The string to process.
* @return The string without white space.
*/
fun removeWhiteSpace(str: String?): String? {
return str?.replace(" ", "")
}
/**
* Check if the device is a TV.
*
* @param context The context to use.
* @return True if the device is a TV, false otherwise.
*/
fun isTv(context: Context): Boolean =
context.packageManager.hasSystemFeature(PackageManager.FEATURE_LEANBACK)
/**
* Find a free port from a list of ports.
*

View File

@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
@@ -57,7 +58,7 @@
<LinearLayout
android:id="@+id/layout_share"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
@@ -81,7 +82,7 @@
<LinearLayout
android:id="@+id/layout_restore"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
@@ -113,7 +114,7 @@
<LinearLayout
android:id="@+id/layout_soure_ccode"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
@@ -137,7 +138,7 @@
<LinearLayout
android:id="@+id/layout_oss_licenses"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
@@ -161,7 +162,7 @@
<LinearLayout
android:id="@+id/layout_feedback"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
@@ -186,7 +187,7 @@
<LinearLayout
android:id="@+id/layout_tg_channel"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
@@ -210,7 +211,7 @@
<LinearLayout
android:id="@+id/layout_privacy_policy"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
@@ -233,7 +234,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:padding="@dimen/padding_spacing_dp16">

View File

@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical">
<com.google.android.material.progressindicator.LinearProgressIndicator
@@ -19,8 +20,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingStart="@dimen/padding_spacing_dp16"
android:paddingEnd="@dimen/padding_spacing_dp16">
android:padding="@dimen/padding_spacing_dp16">
<LinearLayout
android:layout_width="match_parent"
@@ -29,7 +29,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp64"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout

View File

@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.LogcatActivity">
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout

View File

@@ -47,7 +47,8 @@
<com.google.android.material.tabs.TabLayout
android:id="@+id/tab_group"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp64"
android:layout_height="wrap_content"
android:padding="@dimen/padding_spacing_dp8"
app:tabIndicatorFullWidth="false"
app:tabMode="scrollable"
app:tabTextAppearance="@style/TabLayoutTextStyle" />
@@ -63,7 +64,7 @@
<LinearLayout
android:id="@+id/layout_test"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp64"
android:layout_height="wrap_content"
android:background="@color/colorPrimary"
android:clickable="true"
android:focusable="true"
@@ -77,7 +78,7 @@
android:layout_height="wrap_content"
android:maxLines="2"
android:minLines="1"
android:paddingStart="@dimen/padding_spacing_dp16"
android:padding="@dimen/padding_spacing_dp16"
android:text="@string/connection_test_pending"
android:textAppearance="@style/TextAppearance.AppCompat.Small" />

View File

@@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows="true"
tools:context=".ui.SubSettingActivity">
<LinearLayout
@@ -31,7 +32,7 @@
<EditText
android:id="@+id/et_remarks"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -117,7 +118,7 @@
<EditText
android:id="@+id/et_port"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -135,7 +136,7 @@
<EditText
android:id="@+id/et_protocol"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:hint="@string/routing_settings_protocol_tip"
android:inputType="text" />
</LinearLayout>
@@ -154,7 +155,7 @@
<EditText
android:id="@+id/et_network"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:hint="@string/routing_settings_network_tip"
android:inputType="text" />
</LinearLayout>
@@ -171,9 +172,11 @@
android:text="@string/routing_settings_outbound_tag" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_outbound_tag"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/outbound_tag" />
</LinearLayout>

View File

@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.RoutingSettingActivity">
<androidx.core.widget.NestedScrollView
@@ -28,6 +29,8 @@
android:text="@string/routing_settings_domain_strategy" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_domain_strategy"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.ServerCustomConfigActivity">
<LinearLayout
@@ -51,7 +52,7 @@
<EditText
android:id="@+id/et_remarks"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.ServerActivity">
<LinearLayout
@@ -27,7 +28,7 @@
<EditText
android:id="@+id/et_id"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -46,7 +47,7 @@
<EditText
android:id="@+id/et_obfs_password"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -65,7 +66,7 @@
<EditText
android:id="@+id/et_port_hop"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -84,7 +85,7 @@
<EditText
android:id="@+id/et_port_hop_interval"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="number" />
</LinearLayout>
@@ -103,7 +104,7 @@
<EditText
android:id="@+id/et_bandwidth_down"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -122,7 +123,7 @@
<EditText
android:id="@+id/et_bandwidth_up"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.ServerActivity">
<LinearLayout
@@ -27,7 +28,7 @@
<EditText
android:id="@+id/et_id"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -45,9 +46,11 @@
android:text="@string/server_lab_security3" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_security"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/ss_securitys" />
</LinearLayout>

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.ServerActivity">
<LinearLayout
@@ -28,7 +29,7 @@
<EditText
android:id="@+id/et_security"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -47,7 +48,7 @@
<EditText
android:id="@+id/et_id"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.ServerActivity">
<LinearLayout
@@ -27,7 +28,7 @@
<EditText
android:id="@+id/et_id"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.ServerActivity">
<LinearLayout
@@ -27,7 +28,7 @@
<EditText
android:id="@+id/et_id"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -44,9 +45,11 @@
android:text="@string/server_lab_flow" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_flow"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/flows" />
</LinearLayout>
@@ -64,7 +67,7 @@
<EditText
android:id="@+id/et_security"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text"
android:text="none" />

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.ServerActivity">
<LinearLayout
@@ -27,7 +28,7 @@
<EditText
android:id="@+id/et_id"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -44,9 +45,11 @@
android:text="@string/server_lab_security" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_security"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/securitys" />
</LinearLayout>

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.ServerActivity">
<LinearLayout
@@ -27,7 +28,7 @@
<EditText
android:id="@+id/et_id"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -47,7 +48,7 @@
<EditText
android:id="@+id/et_public_key"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -66,7 +67,7 @@
<EditText
android:id="@+id/et_preshared_key"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -90,7 +91,7 @@
<EditText
android:id="@+id/et_reserved1"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -110,7 +111,7 @@
<EditText
android:id="@+id/et_local_address"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -128,7 +129,7 @@
<EditText
android:id="@+id/et_local_mtu"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="number" />
</LinearLayout>

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
tools:context=".ui.SettingsActivity">

View File

@@ -4,6 +4,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:fitsSystemWindows="true"
tools:context=".ui.SubSettingActivity">
<LinearLayout
@@ -43,7 +44,7 @@
<EditText
android:id="@+id/et_remarks"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -87,7 +88,7 @@
<EditText
android:id="@+id/et_filter"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -151,7 +152,7 @@
<EditText
android:id="@+id/et_pre_profile"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:hint="@string/sub_setting_pre_profile_tip"
android:inputType="text" />
@@ -171,7 +172,7 @@
<EditText
android:id="@+id/et_next_profile"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:hint="@string/sub_setting_pre_profile_tip"
android:inputType="text" />

View File

@@ -4,6 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.SubSettingActivity">
<com.google.android.material.progressindicator.LinearProgressIndicator

View File

@@ -3,13 +3,15 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:orientation="vertical"
android:padding="@dimen/padding_spacing_dp16"
tools:context=".ui.TaskerActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp64">
android:layout_height="wrap_content"
android:padding="@dimen/padding_spacing_dp8">
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/switch_start_service"

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".ui.UserAssetUrlActivity">
<LinearLayout
@@ -42,7 +43,7 @@
<EditText
android:id="@+id/et_remarks"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>

View File

@@ -16,9 +16,11 @@
android:orientation="vertical">
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_subscriptionId"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48" />
android:layout_height="wrap_content" />
</LinearLayout>
@@ -36,7 +38,7 @@
<EditText
android:id="@+id/et_keyword"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>

View File

@@ -5,17 +5,18 @@
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:padding="@dimen/padding_spacing_dp8"
android:gravity="center_vertical">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/icon"
android:layout_width="@dimen/view_height_dp72"
android:layout_height="@dimen/view_height_dp72"
android:padding="@dimen/padding_spacing_dp16" />
android:layout_width="@dimen/view_height_dp48"
android:layout_height="@dimen/view_height_dp48"
android:padding="@dimen/padding_spacing_dp8" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:layout_weight="1.0"
android:gravity="center"
android:orientation="vertical">
@@ -42,6 +43,6 @@
android:layout_height="wrap_content"
android:clickable="false"
android:focusable="false"
android:paddingEnd="@dimen/padding_spacing_dp16"/>
android:padding="@dimen/padding_spacing_dp8" />
</LinearLayout>

View File

@@ -8,7 +8,7 @@
<LinearLayout
android:id="@+id/layout_edit"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center"
android:orientation="horizontal"
@@ -18,8 +18,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|left"
android:orientation="vertical"
android:paddingBottom="@dimen/padding_spacing_dp16">
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"

View File

@@ -10,19 +10,22 @@
<LinearLayout
android:id="@+id/info_container"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="?attr/selectableItemBackground"
android:clickable="true"
android:focusable="true"
android:gravity="center"
android:nextFocusRight="@+id/layout_share"
android:orientation="horizontal">
android:orientation="horizontal"
android:paddingTop="@dimen/padding_spacing_dp8"
android:paddingEnd="@dimen/padding_spacing_dp8"
android:paddingStart="@dimen/padding_spacing_dp4"
android:paddingBottom="@dimen/padding_spacing_dp8">
<LinearLayout
android:id="@+id/layout_indicator"
android:layout_width="6dp"
android:layout_marginStart="4dp"
android:layout_height="match_parent"
android:layout_gravity="center"
android:orientation="vertical" />
@@ -32,7 +35,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="@dimen/padding_spacing_dp16">
android:padding="@dimen/padding_spacing_dp8">
<LinearLayout
android:layout_width="wrap_content"
@@ -63,14 +66,14 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical">
android:orientation="vertical"
android:paddingEnd="@dimen/padding_spacing_dp8"
android:paddingStart="@dimen/padding_spacing_dp8">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingTop="4dp"
android:paddingEnd="@dimen/padding_spacing_dp16">
android:orientation="horizontal">
<TextView
android:id="@+id/tv_subscription"
@@ -104,7 +107,7 @@
<LinearLayout
android:id="@+id/layout_share"
android:layout_width="wrap_content"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:focusable="true"
@@ -123,7 +126,7 @@
<LinearLayout
android:id="@+id/layout_edit"
android:layout_width="wrap_content"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:focusable="true"
@@ -141,7 +144,7 @@
<LinearLayout
android:id="@+id/layout_remove"
android:layout_width="wrap_content"
android:layout_height="@dimen/view_height_dp72"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackgroundBorderless"
android:clickable="true"
android:focusable="true"
@@ -160,10 +163,8 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:orientation="vertical"
android:paddingBottom="4dp"
android:paddingEnd="@dimen/padding_spacing_dp16">
android:layout_gravity="end"
android:orientation="vertical">
<TextView
android:id="@+id/tv_type"

View File

@@ -9,7 +9,7 @@
<LinearLayout
android:id="@+id/info_container"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp90"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="?attr/selectableItemBackground"
android:clickable="true"
@@ -17,15 +17,14 @@
android:gravity="center"
android:nextFocusRight="@+id/layout_edit"
android:orientation="horizontal"
android:paddingTop="@dimen/padding_spacing_dp8"
android:paddingBottom="@dimen/padding_spacing_dp8">
android:padding="@dimen/padding_spacing_dp8">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="@dimen/padding_spacing_dp16">
android:padding="@dimen/padding_spacing_dp8">
<LinearLayout
android:layout_width="wrap_content"
@@ -68,11 +67,10 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/view_height_dp90"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingStart="@dimen/padding_spacing_dp16"
android:paddingEnd="@dimen/padding_spacing_dp16">
android:padding="@dimen/padding_spacing_dp8">
<LinearLayout
android:id="@+id/layout_edit"

View File

@@ -9,7 +9,7 @@
<LinearLayout
android:id="@+id/info_container"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp90"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="?attr/selectableItemBackground"
android:clickable="true"
@@ -17,15 +17,14 @@
android:gravity="center"
android:nextFocusRight="@+id/layout_edit"
android:orientation="horizontal"
android:paddingTop="@dimen/padding_spacing_dp8"
android:paddingBottom="@dimen/padding_spacing_dp8">
android:padding="@dimen/padding_spacing_dp8">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="@dimen/padding_spacing_dp16">
android:padding="@dimen/padding_spacing_dp8">
<TextView
android:id="@+id/tv_name"
@@ -45,11 +44,10 @@
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/view_height_dp90"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="vertical"
android:paddingStart="@dimen/padding_spacing_dp16"
android:paddingEnd="@dimen/padding_spacing_dp16">
android:padding="@dimen/padding_spacing_dp8">
<LinearLayout
android:layout_width="wrap_content"

View File

@@ -18,7 +18,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical"
android:paddingStart="@dimen/padding_spacing_dp16">
android:padding="@dimen/padding_spacing_dp8">
<LinearLayout
android:layout_width="wrap_content"

View File

@@ -30,7 +30,7 @@
<EditText
android:id="@+id/et_remarks"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -49,7 +49,7 @@
<EditText
android:id="@+id/et_address"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -68,7 +68,7 @@
<EditText
android:id="@+id/et_port"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="number" />
</LinearLayout>

View File

@@ -19,9 +19,11 @@
android:text="@string/server_lab_stream_security" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_stream_security"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/streamsecurityxs"
android:nextFocusDown="@+id/et_sni" />
@@ -42,7 +44,7 @@
<EditText
android:id="@+id/et_sni"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text"
android:nextFocusDown="@+id/sp_stream_fingerprint" />
@@ -61,9 +63,11 @@
android:text="@string/server_lab_stream_fingerprint" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_stream_fingerprint"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/streamsecurity_utls"
android:nextFocusDown="@+id/sp_stream_alpn" />
@@ -82,9 +86,11 @@
android:text="@string/server_lab_stream_alpn" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_stream_alpn"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/streamsecurity_alpn"
android:nextFocusDown="@+id/sp_allow_insecure" />
@@ -102,9 +108,11 @@
android:text="@string/server_lab_allow_insecure" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_allow_insecure"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/allowinsecures" />
</LinearLayout>
@@ -123,7 +131,7 @@
<EditText
android:id="@+id/et_public_key"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text"
android:nextFocusDown="@+id/sp_stream_fingerprint" />
@@ -144,7 +152,7 @@
<EditText
android:id="@+id/et_short_id"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text"
android:nextFocusDown="@+id/sp_stream_fingerprint" />
@@ -165,7 +173,7 @@
<EditText
android:id="@+id/et_spider_x"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text"
android:nextFocusDown="@+id/sp_stream_fingerprint" />

View File

@@ -19,9 +19,11 @@
android:text="@string/server_lab_stream_security" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_stream_security"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/streamsecuritys"
android:nextFocusDown="@+id/et_sni" />
@@ -42,7 +44,7 @@
<EditText
android:id="@+id/et_sni"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text"
android:nextFocusDown="@+id/sp_stream_fingerprint" />
@@ -61,9 +63,11 @@
android:text="@string/server_lab_allow_insecure" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_allow_insecure"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/allowinsecures" />
@@ -81,7 +85,7 @@
<EditText
android:id="@+id/et_pinsha256"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>

View File

@@ -29,9 +29,11 @@
android:text="@string/server_lab_network" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_network"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:entries="@array/networks" />
</LinearLayout>
@@ -48,9 +50,11 @@
android:text="@string/server_lab_head_type" />
<Spinner
android:layout_marginTop="@dimen/padding_spacing_dp8"
android:layout_marginBottom="@dimen/padding_spacing_dp8"
android:id="@+id/sp_header_type"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48" />
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
@@ -68,7 +72,7 @@
<EditText
android:id="@+id/et_request_host"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>
@@ -88,7 +92,7 @@
<EditText
android:id="@+id/et_path"
android:layout_width="match_parent"
android:layout_height="@dimen/view_height_dp48"
android:layout_height="wrap_content"
android:inputType="text" />
</LinearLayout>

View File

@@ -87,7 +87,7 @@
<string name="server_lab_spider_x">SpiderX</string>
<string name="server_lab_secret_key">کلید خصوصی</string>
<string name="server_lab_reserved">Reserved (اختیاری، جدا شده با کاما)</string>
<string name="server_lab_local_address">آدرس محلی IPV4 (اختیاری)</string>
<string name="server_lab_local_address">آدرس محلی (IPv4/IPv6 اختیاری، جدا شده با کاما)</string>
<string name="server_lab_local_mtu">MTU (اختیاری، پیش‌فرض 1420)</string>
<string name="toast_success">با موفقیت انجام شد</string>
<string name="toast_failure">شکست</string>
@@ -101,7 +101,7 @@
<string name="server_lab_content">محتوا</string>
<string name="toast_none_data_clipboard">هیچ داده‌ ای در کلیپ ‌بورد وجود ندارد</string>
<string name="toast_invalid_url">نشانی اینترنتی معتبر نیست</string>
<string name="toast_insecure_url_protocol">لطفاً از آدرس اشتراک پروتکل HTTP ناامن استفاده نکنید</string>
<string name="toast_insecure_url_protocol">لطفاً از آدرس های اشتراک پروتکل HTTP ناامن استفاده نکنید</string>
<string name="server_lab_need_inbound">اطمینان حاصل کنید که پورت ورودی با تنظیمات مطابقت دارد</string>
<string name="toast_malformed_josn">کانفیگ درست نیست</string>
<string name="server_lab_request_host6">هاست (SNI) (اختیاری)</string>
@@ -143,7 +143,7 @@
<string name="title_advanced">تنظیمات پیشرفته</string>
<string name="title_vpn_settings">تنظیمات VPN</string>
<string name="title_pref_per_app_proxy">پروکسی به تفکیک برنامه</string>
<string name="summary_pref_per_app_proxy">عمومی: برنامه بررسی شده پروکسی است، اتصال مستقیم بدون بررسی است. \nحالت دور زدن: برنامه بررسی شده مستقیما متصل است، پراکسی بررسی نشده است. \nگزینهای برای انتخاب خودکار پروکسی برنامه در منو است.</string>
<string name="summary_pref_per_app_proxy">عمومی: برنامه انتخاب شده از طریق یک پروکسی متصل می شود، برنامه انتخاب نشده مستقیماً متصل می شود. \nحالت دور زدن: برنامه انتخاب شده مستقیماً متصل می شود، برنامه انتخاب نشده از طریق یک پروکسی متصل می شود. \nانتخاب خودکار برنامه های پراکسی در منو امکان پذیر است.</string>
<string name="title_pref_is_booted">اتصال خودکار هنگام راه اندازی</string>
<string name="summary_pref_is_booted">هنگام راه اندازی به طور خودکار به سرور انتخابی متصل می شود که ممکن است ناموفق باشد.</string>
@@ -340,7 +340,7 @@
</string-array>
<string-array name="preset_rulesets">
<item>لیست سفید چین</item>
<item>لیست سفید چین ( دور زدن سرزمین اصلی )</item>
<item>لیست سیاه چین</item>
<item>جهانی(GLOBAL)</item>
<item>ایران</item>

View File

@@ -3,11 +3,11 @@
<style name="AppThemeDayNight" parent="Theme.AppCompat.DayNight.DarkActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@color/colorPrimary</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="colorControlNormal">@color/colorAccent</item>
<item name="android:fitsSystemWindows">true</item>
</style>
</resources>

View File

@@ -1,13 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="padding_spacing_dp4">4dp</dimen>
<dimen name="padding_spacing_dp8">8dp</dimen>
<dimen name="padding_spacing_dp16">16dp</dimen>
<dimen name="image_size_dp24">24dp</dimen>
<dimen name="view_height_dp48">48dp</dimen>
<dimen name="view_height_dp64">64dp</dimen>
<dimen name="view_height_dp72">72dp</dimen>
<dimen name="view_height_dp90">90dp</dimen>
<dimen name="view_height_dp160">160dp</dimen>
</resources>

View File

@@ -2,11 +2,11 @@
<style name="AppThemeDayNight" parent="Theme.AppCompat.DayNight">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimary</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:statusBarColor">@color/colorPrimary</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="colorControlNormal">@color/colorAccent</item>
<item name="android:fitsSystemWindows">true</item>
</style>
<style name="AppThemeDayNight.NoActionBar" parent="AppThemeDayNight">