混淆规则,失败重试间隔调整

This commit is contained in:
Administrator 2025-07-09 17:16:36 +08:00
parent c8d85a2b10
commit 424cb90898
4 changed files with 52 additions and 3 deletions

View File

@ -19,3 +19,51 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
# 保留 Gson 核心类
-keep class com.google.gson.** { *; }
-keep class com.google.gson.stream.** { *; }
# 保留所有注解
-keepattributes *Annotation*
-keepattributes Signature
# 保留枚举类
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
# 保留所有模型类(根据你的包结构调整)
-keep class com.android.grape.pad.** { *; }
-keep class com.example.studyapp.update.ApiResponse{ *; }
-keep class com.example.studyapp.update.ApiResponseList{ *; }
# 保留所有使用 @SerializedName 注解的字段
-keepclassmembers class * {
@com.google.gson.annotations.SerializedName <fields>;
}
# 保留所有模型类的无参构造函数
-keepclassmembers class com.android.grape.pad.** {
public <init>();
}
# 保留类型适配器
-keep class * extends com.google.gson.TypeAdapter {
public com.google.gson.TypeAdapter create(com.google.gson.Gson, com.google.gson.reflect.TypeToken);
}
# 保留 Gson 创建的类
-keep class com.google.gson.examples.android.model.** { *; }
-keepattributes Signature
# 保留 TypeToken 类及其子类
-keep class com.google.gson.reflect.TypeToken { *; }
-keep class * extends com.google.gson.reflect.TypeToken
-keep class sun.misc.Unsafe { *; }
# 保留注解信息
-keepattributes *Annotation*
# 保留 Kotlin 元数据(如果使用 Kotlin
-keepclassmembers class **$TypeToken { *; }

View File

@ -27,7 +27,7 @@ class ScriptJobService : JobIntentService() {
override fun onJobFailed() {
Handler(Looper.getMainLooper()).postDelayed({
StartJobService.onEvent(applicationContext)
}, 1000 * 60 * 5)
}, 1000 * 20)
}
})
}

View File

@ -35,7 +35,7 @@ class StartJobService : JobIntentService() {
override fun onJobFailed() {
Handler(Looper.getMainLooper()).postDelayed({
onEvent(this@StartJobService)
}, 1000 * 5)
}, 1000 * 10)
}
}
)
@ -54,6 +54,7 @@ class StartJobService : JobIntentService() {
afDevice: JSONObject?
) {
ClashUtil.startProxy(applicationContext)
ClashUtil.switchProxyGroup("PROXY", "DIRECT", "http://127.0.0.1:6170")
ClashUtil.switchProxyWithPort(CountryCode.switchCountry())
ClashUtil.switchProxyGroup("PROXY", "my-socks5-proxy", "http://127.0.0.1:6170")
changeDevice(packageName, bigoDevice, afDevice, object : ChangeCallBack {