Skip to content

Commit

Permalink
fix ref cdn selection
Browse files Browse the repository at this point in the history
adds nmbxd.com to supported links
fix r8 rules for retrofit
  • Loading branch information
yudanhezhongweijie committed May 14, 2023
1 parent c23fc4d commit fb4d001
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# ChangeLog 更新日志
- 1.6.12
- 修复引用读取错误
- 支持 xdnmb.com 域名

- 1.6.10
- comply google play policy
- updates dependencies
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ android {
applicationId "com.laotoua.dawnislandk"
minSdkVersion 23
targetSdkVersion 33
versionCode 69
versionName "v1.6.10"
versionCode 72
versionName "v1.6.12"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
22 changes: 22 additions & 0 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,26 @@
-keepattributes SourceFile,LineNumberTable # Keep file names and line numbers.
-keep public class * extends java.lang.Exception # Optional: Keep custom exceptions.

# Please add these rules to your existing keep rules in order to suppress warnings.
# This is generated automatically by the Android Gradle plugin.
-dontwarn org.bouncycastle.jsse.BCSSLParameters
-dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
-dontwarn org.conscrypt.Conscrypt$Version
-dontwarn org.conscrypt.Conscrypt
-dontwarn org.conscrypt.ConscryptHostnameVerifier
-dontwarn org.openjsse.javax.net.ssl.SSLParameters
-dontwarn org.openjsse.javax.net.ssl.SSLSocket
-dontwarn org.openjsse.net.ssl.OpenJSSE

-keepattributes Signature

## Retrofit
# Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items).
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response

# With R8 full mode generic signatures are stripped for classes that are not
# kept. Suspend functions are wrapped in continuations where the type argument
# is used.
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@

<data android:scheme="http" />
<data android:scheme="https" />
<data android:host="www.nmbxd.com" />
<data android:host="www.nmbxd1.com" />
<!-- <data android:host="tnmb.org" />-->
<data android:pathPrefix="/t/" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ class MainActivity : DaggerAppCompatActivity() {
if (ref == "auto") {
availableConnections.values.toList().firstOrNull { it in refCDNs }?.let {
Timber.d("Using $it for Ref")
lastSuccessfulRefCDN = url
lastSuccessfulRefCDN = it
RetrofitUrlManager.getInstance().putDomain("nmb-ref", lastSuccessfulRefCDN)
}
}
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,15 @@

<string-array name="base_cdn_options">
<item>自动</item>
<item>https://nmbxd.com</item>
<item>https://nmbxd1.com</item>
<item>https://api.nmb.fastmirror.org</item>
<item>自定义</item>
</string-array>

<string-array name="ref_cdn_options">
<item>自动</item>
<item>https://nmbxd.com</item>
<item>https://nmbxd1.com</item>
<item>自定义</item>
</string-array>
Expand Down

0 comments on commit fb4d001

Please sign in to comment.