Skip to content

Commit

Permalink
نمایش لودبالانس و کمترین پینگ
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddify-com committed May 3, 2023
1 parent bfcec01 commit 2afca16
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 23 deletions.
4 changes: 2 additions & 2 deletions V2rayNG/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ android {
minSdkVersion 21
targetSdkVersion Integer.parseInt("$targetSdkVer")
multiDexEnabled true
versionCode 5100520 //hiddify when comes to version 5 change it
versionName "2.0.0" //hiddify
versionCode 5100521 //hiddify when comes to version 5 change it
versionName "2.1.0" //hiddify
}

buildTypes {
Expand Down
36 changes: 18 additions & 18 deletions V2rayNG/app/release/output-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,61 +11,61 @@
"type": "UNIVERSAL",
"filters": [],
"attributes": [],
"versionCode": 5100500,
"versionName": "1.5.0",
"versionCode": 5100520,
"versionName": "2.0.0",
"outputFile": "HiddifyNG_null.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "armeabi-v7a"
"value": "x86"
}
],
"attributes": [],
"versionCode": 6100500,
"versionName": "1.5.0",
"outputFile": "HiddifyNG_armeabi-v7a.apk"
"versionCode": 8100520,
"versionName": "2.0.0",
"outputFile": "HiddifyNG_x86.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86_64"
"value": "armeabi-v7a"
}
],
"attributes": [],
"versionCode": 9100500,
"versionName": "1.5.0",
"outputFile": "HiddifyNG_x86_64.apk"
"versionCode": 6100520,
"versionName": "2.0.0",
"outputFile": "HiddifyNG_armeabi-v7a.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "arm64-v8a"
"value": "x86_64"
}
],
"attributes": [],
"versionCode": 7100500,
"versionName": "1.5.0",
"outputFile": "HiddifyNG_arm64-v8a.apk"
"versionCode": 9100520,
"versionName": "2.0.0",
"outputFile": "HiddifyNG_x86_64.apk"
},
{
"type": "ONE_OF_MANY",
"filters": [
{
"filterType": "ABI",
"value": "x86"
"value": "arm64-v8a"
}
],
"attributes": [],
"versionCode": 8100500,
"versionName": "1.5.0",
"outputFile": "HiddifyNG_x86.apk"
"versionCode": 7100520,
"versionName": "2.0.0",
"outputFile": "HiddifyNG_arm64-v8a.apk"
}
],
"elementType": "File"
Expand Down
9 changes: 7 additions & 2 deletions V2rayNG/app/src/main/kotlin/com/v2ray/ang/util/MmkvManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,13 @@ object MmkvManager {
val serverDelays = mutableListOf<ServerDelay>()
val serverList = decodeServerList()
serverList.forEach { key ->
val delay = decodeServerAffiliationInfo(key)?.testDelayMillis ?: 0L
serverDelays.add(ServerDelay(key, if (delay <= 0L) 999999 else delay))
var delay = decodeServerAffiliationInfo(key)?.testDelayMillis ?: 0L
if (delay <= 0L) delay=999999
if (key==HiddifyUtils.getSelectedSubId()+"1")
delay=1
if (key==HiddifyUtils.getSelectedSubId()+"2")
delay=2
serverDelays.add(ServerDelay(key, delay))
}
serverDelays.sortBy { it.testDelayMillis }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,13 @@ open class MainViewModel(application: Application) : AndroidViewModel(applicatio
}

if (keywordFilter.isEmpty() || config.remarks.contains(keywordFilter)) {
serversCache.add(ServersCache(guid, config))
if(config.configType==EConfigType.LoadBalance||config.configType==EConfigType.LowestPing)
serversCache.add(0,ServersCache(guid, config))
else
serversCache.add(ServersCache(guid, config))
}
}

}

fun testAllTcping() {
Expand Down

0 comments on commit 2afca16

Please sign in to comment.