Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f2720ac00b | |||
| 1794ae4759 | |||
| 866ceae75c | |||
| 349cac092f |
@@ -18,8 +18,8 @@ android {
|
||||
minSdkVersion 21
|
||||
targetSdkVersion Integer.parseInt("$targetSdkVer")
|
||||
multiDexEnabled true
|
||||
versionCode 478
|
||||
versionName "1.7.22"
|
||||
versionCode 480
|
||||
versionName "1.7.23"
|
||||
}
|
||||
|
||||
if (props["sign"]) {
|
||||
|
||||
@@ -27,7 +27,6 @@ data class V2rayConfig(
|
||||
const val DEFAULT_SECURITY = "auto"
|
||||
const val DEFAULT_LEVEL = 8
|
||||
const val DEFAULT_NETWORK = "tcp"
|
||||
const val DEFAULT_FLOW = "xtls-rprx-splice"
|
||||
|
||||
const val TLS = "tls"
|
||||
const val XTLS = "xtls"
|
||||
|
||||
@@ -14,9 +14,7 @@ import com.v2ray.ang.R
|
||||
import com.v2ray.ang.dto.EConfigType
|
||||
import com.v2ray.ang.dto.ServerConfig
|
||||
import com.v2ray.ang.dto.V2rayConfig
|
||||
import com.v2ray.ang.dto.V2rayConfig.Companion.DEFAULT_FLOW
|
||||
import com.v2ray.ang.dto.V2rayConfig.Companion.DEFAULT_PORT
|
||||
import com.v2ray.ang.dto.V2rayConfig.Companion.XTLS
|
||||
import com.v2ray.ang.extension.toast
|
||||
import com.v2ray.ang.util.MmkvManager
|
||||
import com.v2ray.ang.util.MmkvManager.ID_MAIN
|
||||
@@ -285,11 +283,7 @@ class ServerActivity : BaseActivity() {
|
||||
vnext.users[0].security = securitys[sp_security?.selectedItemPosition ?: 0]
|
||||
} else if (config.configType == EConfigType.VLESS) {
|
||||
vnext.users[0].encryption = et_security?.text.toString().trim()
|
||||
if (streamSecuritys[sp_stream_security?.selectedItemPosition ?: 0] == XTLS) {
|
||||
vnext.users[0].flow = flows[sp_flow?.selectedItemPosition ?: 0].ifBlank { DEFAULT_FLOW }
|
||||
} else {
|
||||
vnext.users[0].flow = ""
|
||||
}
|
||||
vnext.users[0].flow = flows[sp_flow?.selectedItemPosition ?: 0]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,8 +305,8 @@ class ServerActivity : BaseActivity() {
|
||||
} else if (config.configType == EConfigType.TROJAN) {
|
||||
server.password = et_id.text.toString().trim()
|
||||
server.flow =
|
||||
if (streamSecuritys[sp_stream_security?.selectedItemPosition ?: 0] == XTLS) {
|
||||
flows[sp_flow?.selectedItemPosition ?: 0].ifBlank { DEFAULT_FLOW }
|
||||
if (streamSecuritys[sp_stream_security?.selectedItemPosition ?: 0] == V2rayConfig.XTLS) {
|
||||
flows[sp_flow?.selectedItemPosition ?: 0]
|
||||
} else {
|
||||
""
|
||||
}
|
||||
|
||||
@@ -61,7 +61,10 @@ class MainViewModel(application: Application) : AndroidViewModel(application) {
|
||||
fun removeServer(guid: String) {
|
||||
serverList.remove(guid)
|
||||
MmkvManager.removeServer(guid)
|
||||
serversCache.removeAt(getPosition(guid))
|
||||
val index = getPosition(guid)
|
||||
if(index >= 0){
|
||||
serversCache.removeAt(index)
|
||||
}
|
||||
}
|
||||
|
||||
fun appendCustomConfigServer(server: String) {
|
||||
|
||||
@@ -116,6 +116,8 @@
|
||||
<item>xtls-rprx-direct-udp443</item>
|
||||
<item>xtls-rprx-splice</item>
|
||||
<item>xtls-rprx-splice-udp443</item>
|
||||
<item>xtls-rprx-vision</item>
|
||||
<item>xtls-rprx-vision-udp443</item>
|
||||
</string-array>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user