mirror of
https://gitee.com/willfree/min-vpn-client_v2.git
synced 2026-10-04 19:42:00 +08:00
352 lines
10 KiB
Prolog
352 lines
10 KiB
Prolog
# Add project specific ProGuard rules here.
|
|
# You can control the set of applied configuration files using the
|
|
# proguardFiles setting in build.gradle.
|
|
#
|
|
# For more details, see
|
|
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
|
|
# If your project uses WebView with JS, uncomment the following
|
|
# and specify the fully qualified class name to the JavaScript interface
|
|
# class:
|
|
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
# public *;
|
|
#}
|
|
|
|
# Uncomment this to preserve the line number information for
|
|
# debugging stack traces.
|
|
#-keepattributes SourceFile,LineNumberTable
|
|
|
|
# If you keep the line number information, uncomment this to
|
|
# hide the original source file name.
|
|
#-renamesourcefileattribute SourceFile
|
|
|
|
|
|
# 以下是旧版VPN的本配置文件内容
|
|
#---------------------------------基本指令区-----------------------
|
|
|
|
-optimizationpasses 5 #指定代码的压缩级别
|
|
-dontpreverify #预校验
|
|
-verbose #指定日志级别
|
|
-dontskipnonpubliclibraryclassmembers
|
|
-dontusemixedcaseclassnames #包名不混合大小写
|
|
-ignorewarnings #忽略警告
|
|
-printmapping proguardMapping.txt #生成原类名和混淆后的类名的映射文件
|
|
-optimizations !code/simplification/cast,!field/*,!class/merging/* #混淆时所采用的算法
|
|
-keepattributes *Annotation*,InnerClasses
|
|
-keepattributes Signature
|
|
-keepattributes SourceFile,LineNumberTable
|
|
|
|
|
|
#---------------------------------默认保留区------------------------
|
|
|
|
#四大组件、View体系等
|
|
-keep public class * extends android.app.Activity
|
|
-keep public class * extends android.app.Application
|
|
-keep public class * extends android.app.Fragment
|
|
-keep public class * extends android.support.multidex.MultiDexApplication
|
|
-keep public class * extends android.app.Service
|
|
-keep public class * extends android.content.BroadcastReceiver
|
|
-keep public class * extends android.content.ContentProvider
|
|
-keep public class * extends android.preference.Preference
|
|
-keep public class * extends android.view.View
|
|
-keep class android.support.** {*;}
|
|
-keep public class * extends android.support.v4.**
|
|
|
|
-keep public class * extends android.view.View{
|
|
*** get*();
|
|
void set*(***);
|
|
public <init>(android.content.Context);
|
|
public <init>(android.content.Context, android.util.AttributeSet);
|
|
public <init>(android.content.Context, android.util.AttributeSet, int);
|
|
}
|
|
|
|
-keepclassmembers public class * extends android.view.View {
|
|
void set*(***);
|
|
*** get*();
|
|
}
|
|
|
|
-keepclasseswithmembers class * {
|
|
public <init>(android.content.Context, android.util.AttributeSet);
|
|
public <init>(android.content.Context, android.util.AttributeSet, int);
|
|
}
|
|
|
|
-keepclassmembers class * extends android.app.Activity {
|
|
public void *(android.view.View);
|
|
}
|
|
|
|
#Serializable
|
|
-keepclassmembers class * implements java.io.Serializable {
|
|
static final long serialVersionUID;
|
|
private static final java.io.ObjectStreamField[] serialPersistentFields;
|
|
private void writeObject(java.io.ObjectOutputStream);
|
|
private void readObject(java.io.ObjectInputStream);
|
|
java.lang.Object writeReplace();
|
|
java.lang.Object readResolve();
|
|
}
|
|
|
|
-keep class **.R$* {
|
|
*;
|
|
}
|
|
|
|
-keepclassmembers class * {
|
|
void *(*Event);
|
|
}
|
|
|
|
#enum
|
|
-keepclassmembers enum * {
|
|
public static **[] values();
|
|
public static ** valueOf(java.lang.String);
|
|
}
|
|
|
|
-keepclasseswithmembernames class * {
|
|
native <methods>;
|
|
}
|
|
|
|
-keepclassmembers class * {
|
|
public <init> (org.json.JSONObject);
|
|
}
|
|
|
|
-keepclasseswithmembernames class * {
|
|
native <methods>;
|
|
}
|
|
|
|
#Parcelable
|
|
-keep class * implements android.os.Parcelable {
|
|
public static final android.os.Parcelable$Creator *;
|
|
}
|
|
|
|
#webview
|
|
-keepclassmembers class fqcn.of.javascript.interface.for.Webview {
|
|
public *;
|
|
}
|
|
-keepclassmembers class * extends android.webkit.WebViewClient {
|
|
public void *(android.webkit.WebView, java.lang.String, android.graphics.Bitmap);
|
|
public boolean *(android.webkit.WebView, java.lang.String);
|
|
}
|
|
-keepclassmembers class * extends android.webkit.WebViewClient {
|
|
public void *(android.webkit.WebView, jav.lang.String);
|
|
}
|
|
|
|
|
|
#----------------------------------Kotlin--------------------------------------
|
|
|
|
#kotlin
|
|
-keep class kotlin.** { *; }
|
|
-keep class kotlin.Metadata { *; }
|
|
-dontwarn kotlin.**
|
|
-keepclassmembers class **$WhenMappings {
|
|
<fields>;
|
|
}
|
|
-keepclassmembers class kotlin.Metadata {
|
|
public <methods>;
|
|
}
|
|
-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
|
|
static void checkParameterIsNotNull(java.lang.Object, java.lang.String);
|
|
}
|
|
-keep class kotlinx.coroutines.android.** {*;}
|
|
# ServiceLoader support
|
|
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
|
|
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
|
|
-keepnames class kotlinx.coroutines.android.AndroidExceptionPreHandler {}
|
|
-keepnames class kotlinx.coroutines.android.AndroidDispatcherFactory {}
|
|
|
|
# Most of volatile fields are updated with AFU and should not be mangled
|
|
-keepclassmembernames class kotlinx.** {
|
|
volatile <fields>;
|
|
}
|
|
|
|
|
|
|
|
#---------------------------------Support Vx ---------------------------------
|
|
|
|
# support-v4
|
|
-dontwarn android.support.v4.**
|
|
-keep class android.support.v4.app.** { *; }
|
|
-keep interface android.support.v4.app.** { *; }
|
|
-keep class android.support.v4.** { *; }
|
|
-keep class android.support.v4.** {
|
|
<fields>;
|
|
<methods>;
|
|
}
|
|
-keep interface android.support.v4.app.** {
|
|
<fields>;
|
|
<methods>;
|
|
}
|
|
|
|
# support-v7
|
|
-dontwarn android.support.v7.**
|
|
-keep class android.support.v7.internal.** { *; }
|
|
-keep interface android.support.v7.internal.** { *; }
|
|
-keep class android.support.v7.** { *; }
|
|
|
|
# support design
|
|
-dontwarn android.support.design.**
|
|
-keep class android.support.design.** { *; }
|
|
-keep interface android.support.design.** { *; }
|
|
-keep public class android.support.design.R$* { *; }
|
|
|
|
|
|
|
|
#---------------------------------androidx-------------------------
|
|
-keep class com.google.android.material.** {*;}
|
|
|
|
-keep class androidx.** {*;}
|
|
|
|
-keep public class * extends androidx.**
|
|
|
|
-keep interface androidx.** {*;}
|
|
|
|
-dontwarn com.google.android.material.**
|
|
|
|
-dontnote com.google.android.material.**
|
|
|
|
-dontwarn androidx.**
|
|
|
|
|
|
#---------------------------------model and scan and util-------------------------
|
|
-keep class cn.qjm253.min_vpn.model.error.** {*;}
|
|
-keep public class * extends cn.qjm253.min_vpn.model.error.**
|
|
-keep interface cn.qjm253.min_vpn.model.error.** {*;}
|
|
|
|
-keep class cn.qjm253.min_vpn.model.event.** {*;}
|
|
-keep public class * extends cn.qjm253.min_vpn.model.event.**
|
|
-keep interface cn.qjm253.min_vpn.model.event.** {*;}
|
|
|
|
-keep class cn.qjm253.min_vpn.model.request.** {*;}
|
|
-keep public class * extends cn.qjm253.min_vpn.model.request.**
|
|
-keep interface cn.qjm253.min_vpn.model.request.** {*;}
|
|
|
|
-keep class cn.qjm253.min_vpn.model.response.** {*;}
|
|
-keep public class * extends cn.qjm253.min_vpn.model.response.**
|
|
-keep interface cn.qjm253.min_vpn.model.response.** {*;}
|
|
|
|
-keep class cn.qjm253.min_vpn.model.info.** {*;}
|
|
-keep public class * extends cn.qjm253.min_vpn.model.info.**
|
|
-keep interface cn.qjm253.min_vpn.model.info.** {*;}
|
|
|
|
#-keep class cn.qjm253.min_vpn.model.** {*;}
|
|
#
|
|
#-keep public class * extends cn.qjm253.min_vpn.model.**
|
|
#
|
|
#-keep interface cn.qjm253.min_vpn.model.** {*;}
|
|
|
|
#-keep class cn.qjm253.min_vpn.scan.** {*;}
|
|
#
|
|
#-keep public class * extends cn.qjm253.min_vpn.scan.**
|
|
#
|
|
#-keep interface cn.qjm253.min_vpn.scan.** {*;}
|
|
|
|
#-keep class cn.qjm253.min_vpn.utils.** {*;}
|
|
#
|
|
#-keep public class * extends cn.qjm253.min_vpn.utils.**
|
|
#
|
|
#-keep interface cn.qjm253.min_vpn.utils.** {*;}
|
|
#-keepattributes Exceptions,InnerClasses,...
|
|
#-keep public class cn.qjm253.min_vpn.utils.SafetyInfoUtil { *; }
|
|
#-keep public class cn.qjm253.min_vpn.utils.SafetyInfoUtil$* { *; }
|
|
|
|
#-keepnames public class cn.qjm253.min_vpn.utils.SafetyInfoUtil, cn.qjm253.min_vpn.utils.SafetyInfoUtil$* {
|
|
# public <fields>;
|
|
# public <methods>;
|
|
#}
|
|
|
|
#---------------------------------第三方包-------------------------
|
|
|
|
#okhttp3.x
|
|
-dontwarn com.squareup.okhttp3.**
|
|
-keep class com.squareup.okhttp3.** { *;}
|
|
-dontwarn okio.**
|
|
-dontwarn com.squareup.okhttp.**
|
|
-keep class com.squareup.okhttp.{*;}
|
|
-dontwarn javax.annotation.**
|
|
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
|
|
-dontwarn org.codehaus.mojo.animal_sniffer.*
|
|
-dontwarn okhttp3.internal.platform.ConscryptPlatform
|
|
|
|
#retrofit
|
|
-dontwarn retrofit.**
|
|
-keep class retrofit.** { *; }
|
|
-keepattributes Signature
|
|
-keepattributes Exceptions
|
|
-dontwarn okio.**
|
|
|
|
#Rxjava RxAndroid
|
|
-dontwarn rx.*
|
|
-dontwarn sun.misc.**
|
|
|
|
#Glide
|
|
-keep public class * implements com.bumptech.glide.module.GlideModule
|
|
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
|
|
**[] $VALUES;
|
|
public *;
|
|
}
|
|
|
|
#Gson
|
|
-keep class com.google.gson.** {*;}
|
|
-keep class com.google.**{*;}
|
|
-keep class sun.misc.Unsafe { *; }
|
|
-keep class com.google.gson.stream.** { *; }
|
|
-keep class com.google.gson.examples.android.model.** { *; }
|
|
|
|
#Lambda表达式
|
|
-keep class java.lang.invoke.** {*;}
|
|
-dontwarn java.lang.invoke.**
|
|
|
|
|
|
#eventbus 3.0
|
|
-keepattributes *Annotation*
|
|
-keepclassmembers class ** {
|
|
@org.greenrobot.eventbus.Subscribe <methods>;
|
|
}
|
|
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
|
|
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
|
|
<init>(java.lang.Throwable);
|
|
}
|
|
|
|
#jackson
|
|
-keep @com.fasterxml.jackson.annotation.JsonIgnoreProperties class * { *; }
|
|
-keep @com.fasterxml.jackson.annotation.JsonCreator class * { *; }
|
|
-keep @com.fasterxml.jackson.annotation.JsonValue class * { *; }
|
|
-keep class sun.misc.Unsafe { *; }
|
|
-keepattributes *Annotation*,EnclosingMethod,Signature
|
|
-keepnames class com.fasterxml.jackson.** { *; }
|
|
-dontwarn com.fasterxml.jackson.databind.**
|
|
-keep class org.codehaus.** { *; }
|
|
-keepclassmembers public final enum org.codehaus.jackson.annotate.JsonAutoDetect$Visibility {
|
|
public static final org.codehaus.jackson.annotate.JsonAutoDetect$Visibility *; }
|
|
|
|
#百度地图
|
|
-keep class com.baidu.** { *; }
|
|
|
|
#虹软
|
|
-keep class com.arcsoft.face.** { *; }
|
|
|
|
#Jndn
|
|
-keep class net.named_data.jndn.** { *; }
|
|
|
|
#commons-codec
|
|
-keep class edu.pku.commons.codec.** { *; }
|
|
|
|
#nucypher-crypto-oss-master and bouncycastle
|
|
-keep class com.nucypher.crypto.** { *; }
|
|
-keep class org.bouncycastle.** { *; }
|
|
|
|
#xUtils
|
|
-keep class com.lidroid.xutils.** { *; }
|
|
|
|
#junit
|
|
-keep class org.junit.** { *; }
|
|
-dontwarn org.junit.**
|
|
|
|
-keep class junit.** { *; }
|
|
-dontwarn junit.**
|
|
|
|
#goldFinger
|
|
-keep class co.infinum.goldfinger.** { *; }
|
|
|
|
#gmHelper
|
|
-keep class org.zz.gmhelper.** {* ;}
|
|
|
|
|
|
#logback
|
|
-keep class ch.qos.logback.** {* ;} |