Skip to content

Commit 5ad5ae1

Browse files
author
Pk-web6936
authored
Merge branch '2dust:master' into patch-1
2 parents 8e4a345 + 4a87549 commit 5ad5ae1

7 files changed

Lines changed: 21 additions & 21 deletions

File tree

AndroidLibXrayLite

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ A V2Ray client for Android, support [Xray core](https://github.com/XTLS/Xray-cor
99
[![GitHub Releases](https://img.shields.io/github/downloads/2dust/v2rayNG/latest/total?logo=github)](https://github.com/2dust/v2rayNG/releases)
1010
[![Chat on Telegram](https://img.shields.io/badge/Chat%20on-Telegram-brightgreen.svg)](https://t.me/v2rayn)
1111

12-
<a href="https://play.google.com/store/apps/details?id=com.v2ray.ang">
13-
<img alt="Get it on Google Play" src="https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png" width="165" height="64" />
14-
</a>
15-
1612
### Telegram Channel
1713
[github_2dust](https://t.me/github_2dust)
1814

V2rayNG/app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ android {
1212
applicationId = "com.v2ray.ang"
1313
minSdk = 21
1414
targetSdk = 35
15-
versionCode = 651
16-
versionName = "1.10.1"
15+
versionCode = 652
16+
versionName = "1.10.2"
1717
multiDexEnabled = true
1818

1919
val abiFilterList = (properties["ABI_FILTERS"] as? String)?.split(';')

V2rayNG/app/src/main/java/com/v2ray/ang/AppConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ object AppConfig {
103103
const val TG_CHANNEL_URL = "https://t.me/github_2dust"
104104
const val DELAY_TEST_URL = "https://www.gstatic.com/generate_204"
105105
const val DELAY_TEST_URL2 = "https://www.google.com/generate_204"
106-
const val IP_API_Url = "https://api.ip.sb/geoip"
106+
const val IP_API_URL = "https://speed.cloudflare.com/meta"
107107

108108
/** DNS server addresses. */
109109
const val DNS_PROXY = "1.1.1.1"

V2rayNG/app/src/main/java/com/v2ray/ang/dto/IPAPIInfo.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ package com.v2ray.ang.dto
22

33
data class IPAPIInfo(
44
var ip: String? = null,
5-
var city: String? = null,
6-
var region: String? = null,
7-
var region_code: String? = null,
5+
var clientIp: String? = null,
6+
var ip_addr: String? = null,
7+
var query: String? = null,
88
var country: String? = null,
99
var country_name: String? = null,
10-
var country_code: String? = null
10+
var country_code: String? = null,
11+
var countryCode: String? = null
1112
)

V2rayNG/app/src/main/java/com/v2ray/ang/handler/SpeedtestManager.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,13 @@ object SpeedtestManager {
168168

169169
fun getRemoteIPInfo(): String? {
170170
val httpPort = SettingsManager.getHttpPort()
171-
var content = HttpUtil.getUrlContent(AppConfig.IP_API_Url, 5000, httpPort) ?: return null
171+
var content = HttpUtil.getUrlContent(AppConfig.IP_API_URL, 5000, httpPort) ?: return null
172172

173173
var ipInfo = JsonUtil.fromJson(content, IPAPIInfo::class.java) ?: return null
174-
return "(${ipInfo.country_code}) ${ipInfo.ip}"
174+
var ip = ipInfo.ip ?: ipInfo.clientIp ?: ipInfo.ip_addr ?: ipInfo.query
175+
var country = ipInfo.country_code ?: ipInfo.country ?: ipInfo.countryCode
176+
177+
return "(${country ?: "unknown"}) $ip"
175178
}
176179

177180
/**

V2rayNG/app/src/main/java/com/v2ray/ang/ui/AboutActivity.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ class AboutActivity : BaseActivity() {
106106
}
107107

108108
//If it is the Google Play version, not be displayed within 1 days after update
109-
if (Utils.isGoogleFlavor()) {
110-
val lastUpdateTime = AppManagerUtil.getLastUpdateTime(this)
111-
val currentTime = System.currentTimeMillis()
112-
if ((currentTime - lastUpdateTime) < 1 * 24 * 60 * 60 * 1000L) {
113-
binding.layoutCheckUpdate.visibility = View.GONE
114-
}
115-
}
109+
// if (Utils.isGoogleFlavor()) {
110+
// val lastUpdateTime = AppManagerUtil.getLastUpdateTime(this)
111+
// val currentTime = System.currentTimeMillis()
112+
// if ((currentTime - lastUpdateTime) < 1 * 24 * 60 * 60 * 1000L) {
113+
// binding.layoutCheckUpdate.visibility = View.GONE
114+
// }
115+
// }
116116
binding.layoutCheckUpdate.setOnClickListener {
117117
checkForUpdates(binding.checkPreRelease.isChecked)
118118
}

0 commit comments

Comments
 (0)