Compare commits

..

4 Commits

Author SHA1 Message Date
2dust
ee4f05b07d up 1.9.0 2024-09-17 13:47:21 +08:00
2dust
17ef476ede Bug fix 2024-09-17 13:39:02 +08:00
2dust
141b98631c Update libs.versions.toml 2024-09-17 11:08:49 +08:00
2dust
845562bca3 adapter noises 2024-09-17 11:02:13 +08:00
6 changed files with 25 additions and 18 deletions

View File

@@ -11,8 +11,8 @@ android {
applicationId = "com.v2ray.ang"
minSdk = 21
targetSdk = 34
versionCode = 586
versionName = "1.8.40"
versionCode = 591
versionName = "1.9.0"
multiDexEnabled = true
splits {
abi {

View File

@@ -85,7 +85,7 @@ data class V2rayConfig(
data class OutSettingsBean(
var vnext: List<VnextBean>? = null,
var fragment: FragmentBean? = null,
var noise: NoiseBean? = null,
var noises: List<NoiseBean>? = null,
var servers: List<ServersBean>? = null,
/*Blackhole*/
var response: Response? = null,
@@ -129,6 +129,7 @@ data class V2rayConfig(
)
data class NoiseBean(
var type: String? = null,
var packet: String? = null,
var delay: String? = null
)

View File

@@ -54,4 +54,6 @@ val URLConnection.responseLength: Long
val URI.idnHost: String
get() = host?.replace("[", "")?.replace("]", "").orEmpty()
fun String.removeWhiteSpace(): String = replace("\\s+".toRegex(), "")
fun String.removeWhiteSpace(): String = replace("\\s+".toRegex(), "")
fun String.toLongEx(): Long = toLongOrNull() ?: 0

View File

@@ -17,6 +17,7 @@ import com.tencent.mmkv.MMKV
import com.v2ray.ang.AngApplication
import com.v2ray.ang.AppConfig
import com.v2ray.ang.R
import com.v2ray.ang.extension.toLongEx
import com.v2ray.ang.service.SubscriptionUpdater
import com.v2ray.ang.util.MmkvManager
import com.v2ray.ang.util.Utils
@@ -128,7 +129,7 @@ class SettingsActivity : BaseActivity() {
val value = newValue as Boolean
autoUpdateCheck?.isChecked = value
autoUpdateInterval?.isEnabled = value
autoUpdateInterval?.text?.toLong()?.let {
autoUpdateInterval?.text?.toLongEx()?.let {
if (newValue) configureUpdateTask(it) else cancelUpdateTask()
}
true
@@ -138,9 +139,9 @@ class SettingsActivity : BaseActivity() {
// It must be greater than 15 minutes because WorkManager couldn't run tasks under 15 minutes intervals
nval =
if (TextUtils.isEmpty(nval) || nval.toLong() < 15) AppConfig.SUBSCRIPTION_DEFAULT_UPDATE_INTERVAL else nval
if (TextUtils.isEmpty(nval) || nval.toLongEx() < 15) AppConfig.SUBSCRIPTION_DEFAULT_UPDATE_INTERVAL else nval
autoUpdateInterval?.summary = nval
configureUpdateTask(nval.toLong())
configureUpdateTask(nval.toLongEx())
true
}

View File

@@ -641,9 +641,12 @@ object V2rayConfigUtil {
interval = settingsStorage?.decodeString(AppConfig.PREF_FRAGMENT_INTERVAL)
?: "10-20"
),
noise = V2rayConfig.OutboundBean.OutSettingsBean.NoiseBean(
packet = "rand:100-200",
delay = "10-20",
noises = listOf(
V2rayConfig.OutboundBean.OutSettingsBean.NoiseBean(
type = "rand",
packet = "100-200",
delay = "10-20",
)
),
)
fragmentOutbound.streamSettings = V2rayConfig.OutboundBean.StreamSettingsBean(

View File

@@ -1,26 +1,26 @@
[versions]
activityKtx = "1.9.1"
activityKtx = "1.9.2"
appcompat = "1.7.0"
cardview = "1.0.0"
constraintlayout = "2.1.4"
core = "3.5.3"
editorkit = "2.9.0"
flexbox = "3.0.0"
fragmentKtx = "1.8.2"
fragmentKtx = "1.8.3"
gson = "2.11.0"
junit = "4.13.2"
kotlinReflect = "2.0.0"
kotlinxCoroutinesCore = "1.8.1"
kotlinReflect = "2.0.20"
kotlinxCoroutinesCore = "1.9.0"
legacySupportV4 = "1.0.0"
lifecycleViewmodelKtx = "2.8.4"
lifecycleViewmodelKtx = "2.8.5"
material = "1.12.0"
mmkvStatic = "1.3.4"
mmkvStatic = "1.3.9"
multidex = "2.0.1"
preferenceKtx = "1.2.1"
quickieBundled = "1.9.0"
quickieBundled = "1.10.0"
recyclerview = "1.3.2"
rxandroid = "3.0.2"
rxjava = "3.1.8"
rxjava = "3.1.9"
rxpermissions = "0.12"
toastcompat = "1.1.0"
viewpager2 = "1.1.0"